Faraz Shah Khan

MCP, MCAD.Net, MCSD.Net, MCTS-Win, MCTS-Web, MCPD-Web

Passing value from popup window to parent form's TextBox

Once again seen lot of questions on the forum related to passing values from popup window to the parent form textbox. Specially when they have some GridView type control in the popup. In the following example I will be using two forms, parent form will be parent.aspx and popup will be popup.aspx. Also note that my parent.aspx form is derived from some MasterPage. Code is provided both in VB.Net and C#.Net.

--- .aspx of parent form ---

<script type="text/javascript">
        function OpenPopup()
        {
            window.open("popup.aspx","List","scrollbars=no,resizable=no,width=400,height=280");
            return false;
        }
</script>
.
.
.
<asp:TextBox ID="txtPopupValue" runat="server" Width="327px"></asp:TextBox>
    <asp:Button ID="Button1" runat="server" Text="Show List" />

--- .vb of parent.aspx if vb.net is the language ---

If Not IsPostBack Then
 Me.Button1.Attributes.Add("onclick", "javascript:return OpenPopup()")
End If

--- .cs of parent.aspx if C#.net is the language ---

if !(IsPostBack)
{
 this.Button1.Attributes.Add("onclick", "javascript:return OpenPopup()");
}

 

--- .aspx of popup form ---

<script language="javascript">
        function GetRowValue(val)
        {
            window.opener.document.getElementById("ctl00_ContentPlaceHolder1_TextBox2").value = val; //hardcoded value used to minimize the code. ControlID can be passed as query string to the popup window
            window.close();
        }
</script>
.
.
.
<asp:GridView ID="GridView1" runat="server" DataSourceID="SqlDataSource1" Width="400px" AllowPaging="True">
            <Columns>
                <asp:TemplateField>
                    <AlternatingItemTemplate>
                        <asp:Button ID="btnSelect" runat="server" Text="Select" />
                    </AlternatingItemTemplate>
                    <ItemTemplate>
                        <asp:Button ID="btnSelect" runat="server" Text="Select" />
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
        </asp:GridView>

--- .vb file if vb.net is the language ---

Protected Sub GridView1_RowDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GridView1.RowDataBound
        If (e.Row.RowType = DataControlRowType.DataRow) Then
            DirectCast(e.Row.FindControl("btnSelect"), Button).Attributes.Add("onclick", "javascript:GetRowValue('" & e.Row.Cells(1).Text & "')") 'assuming that the required value column is the second column in gridview
        End If
    End Sub

--- .cs file if C#.net is the language ---

protected void GridView1_RowDataBound(object sender, System.Web.UI.WebControls.GridViewRowEventArgs e)
{
    if ((e.Row.RowType == DataControlRowType.DataRow)) {
        ((Button)e.Row.FindControl("btnSelect")).Attributes.Add("onclick", "javascript:GetRowValue('" + e.Row.Cells(1).Text + "')");
        //assuming that the required value column is the second column in gridview
    }
}

 

I hope the code above is straight forward and easy to understand.

Happy Coding!!!

Comments

ei said:

Nice code..

but i altered a bit to get it runs on my visual web dev 2008...

thx anyway

--- .cs of parent.aspx if C#.net is the language ---

if (!(IsPostBack))

# February 20, 2008 10:00 PM

arun said:

nice

# March 13, 2008 2:38 PM

violentk said:

Thanks dude, that's what i been searching for

# April 3, 2008 11:44 AM

Priya said:

I can't get it done....it shows a error that e.row is not declared....how am i suppose to solve this

Thanks

# April 27, 2008 10:43 PM

Balaji said:

This code is very nice,

# May 19, 2008 2:48 AM

Bluekaizen said:

error in ('" + e.Row.Cells(1).Text + "')"); if I change to ('" + e.Row.Cells[1].Text + "')");

nothing error but I can't send the value to parent.

# May 21, 2008 1:56 AM

Farhan said:

Can anybody tell me how to pass value from Popup window to Parentwindow.

I've a parent.aspx page in which i have three textboxes with each have images for opening ImageSelector Popup window. When I click on the image then popup window open and when i choose image and then click on the save button then after i want to close the popup window and then the selected image name should be display in the textbox.

Note that I have three textbox.

1.txtSmallImage    (Img1_ImageSelectorPopUp)

2.txtMediumImage   (Img2_ImageSelectorPopUp)

3.txtLargeImage    (Img3_ImageSelectorPopUp)

What i did when i click on the image1, image2, image3 then i opened the same popup window. Now i made a fucntion in a javascript name GetImageName(imageName). When i click on the save button then I call this function like that

 this.btnSave.Attributes.Add("onclick","javascript:GetImageName('" + ImageName + "')");

the defination of function is here

function GetImageName(ImageName)

{  

   // ControlID can instead be passed as query string to the popup window

   //window.opener.document.getElementById("ctl00_ContentPlaceHolder1_TextBox2").value = ImageName;

   window.opener.document.getElementById("ctl00_MainContentPlaceHolder_txtprdTitleImage").value = ImageName;    

   window.close();

   //window.opener.document.all("select1").options(window.opener.document.all("select1").selectedIndex).text=text1.value ;

}

Problem is that I dont understand that how can I access the parent page controls like txtSmallImage, txtMediumImage, txtLargeImage so that I can assigin the value to that controls's text property value.

Please help me or if you understand what i want to do then kindly provide me the complete solution means that when i click on the any imagePopup then value return on the specific txt(Small,large, medium)Image textbox.

Rgds,

Farhan,

Karachi, Pakistan.

# May 22, 2008 2:27 AM

ronaldovn said:

I can't send the value to parent.

# June 10, 2008 2:45 AM

stdanny said:

hi...I got error in here when i tried your code... I got error in here : javascript:GetRowValue('" + e.Row.Cells(1).Text + "')");

Sorry...I'm still beginner in .NET...

# June 12, 2008 5:08 AM

preethi said:

hi the code does not work for me neither...

no value is being passes to the parent from the popup window and the window doesnt close after clicking on the select button.. which shows that it does not enter the piece of code where the getrowval is being called..

how to solve this issue?

# June 16, 2008 9:46 AM

farazsk11 said:

sorry guys i was out since some time... for those like

preethi, stdanny, ronaldovn and Bluekaizen what problem you guys are having... some error?

# July 23, 2008 9:01 AM

farazsk11 said:

for all those who are getting problem in the above code try this.

create 2 pages. parent.aspx and pop.aspx

now place this in parent.aspx

<head runat="server">

   <title>Untitled Page</title>

   <script type="text/javascript">

       function openPopup()

       {

          window.open("pop.aspx");

       }

   </script>

</head>

<body>

   <form id="form1" runat="server">

   <div>

       <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox><asp:Button ID="Button1"

           runat="server" Text="Open Popup" OnClientClick="openPopup()" />

   </div>

   </form>

</body>

and place this in pop.aspx

<head runat="server">

   <title>Untitled Page</title>

   <script type="text/javascript">

       function passValueToParent()

       {

           window.opener.document.getElementById('TextBox1').value = document.getElementById('TextBox1').value;

           window.close();

       }

   </script>

</head>

<body>

   <form id="form1" runat="server">

   <div>

       <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox><asp:Button ID="Button1"

           runat="server" Text="Pass Text Box Value to Parent" OnClientClick = "passValueToParent()" />

   </div>

   </form>

</body>

now test it.

# July 23, 2008 9:39 AM

Harminder Singh said:

Hi,

what preethi said  GridView1_RowDataBound event is not firing thats why it is not passing value to parent page .when i am clicking on button select

GridView1_RowDataBound should fire but it is not firing that event.

# August 18, 2008 6:36 AM

farazsk11 said:

@Harminder

What I believe that you and preethi are not mapping GridView1 with the RowDataBound event using Events window.

Try placing GridView on your form like this

<asp:GridView ID="GridView1" runat="server" Width="400px" OnRowDataBound="GridView1_RowDataBound">

Here I manually map OnRowDataBound event with the handler GridView1_RowDataBound

I hope it will solve your problem.

# August 18, 2008 7:31 AM

Harminder Singh said:

i have already map it on page load this event is firing but on select button it is not

<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" OnRowDataBound="GridView1_RowDataBound" >

i am not using sqldatasource but filling from database

from datareader through loop

# August 18, 2008 7:55 AM

farazsk11 said:

@Harminder

Try placing your code as its difficult to find the cause of problem.

# August 18, 2008 8:25 AM

ankurvermaaries said:

when the pop window is closed and control is returned to main page.

The textboxes have updated values but the problem is when i tried to read those values by code it is showing me Null.

please help

# August 29, 2008 5:36 AM

farazsk11 said:

@ankurvermaaries

I just check the application again and placed another button to write the value on the page of the TextBox that was filled by the popup and it worked fine. Also try placing your code.

# August 30, 2008 1:39 AM

yatie said:

i have more than 1 textbox .  I tried do like this.  But still can't get the solution.

popup.aspx

  <script language="javascript">

       function GetRowValue(val)

       {

           window.opener.document.getElementById("ddlcode").value = val; //hardcoded value used to minimize the code. ControlID can be passed as query string to the popup window

           window.opener.document.getElementById("txtPopupValue").value = val1;

           window.close();

       }

</script>

pop.aspx.vb

DirectCast(e.Row.FindControl("btnSelect"), Button).Attributes.Add("onclick", "javascript:GetRowValue('" & e.Row.Cells(1).Text & "')")

           DirectCast(e.Row.FindControl("btnSelect"), Button).Attributes.Add("onclick", "javascript:GetRowValue('" & e.Row.Cells(2).Text & "')")

pls help me

# September 4, 2008 10:20 PM

farazsk11 said:

@yatie

Try to modify your code like this

DirectCast(e.Row.FindControl("btnSelect"), Button).Attributes.Add("onclick", "javascript:GetRowValue('" & e.Row.Cells(1).Text & "','"& e.Row.Cells(2).Text & "')")

and the signature of javascript function will look like this

function GetRowValue(val1, val2)

What this code will do?

It will pass 2 parameters i.e. first and second column values of the GridView in the javascript function.

Hope it will solve your problem.

# September 5, 2008 5:54 AM

yatie said:

farazsk11,

I already add in that code but when i click data undefined.  

And, How i to control if form in :-

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">

</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">

<dxrp:ASPxRoundPanel ID="ASPxRoundPanel1" runat="server"

       HeaderText="Misc. Master" Height="257px" Width="425px" align=center>

   <PanelCollection>

       <dxrp:PanelContent ID="PanelContent1" runat="server">

is it like this :-

window.opener.document.getElementById("Content2_ContentPlaceHolder1_ASPxRoundPanel1_PanelContent1_ddltype").value = val; //hardcoded value used to minimize the code. ControlID can be passed as query string to the popup window <-- but not successful

# September 7, 2008 11:31 PM

yatie said:

farazsk11,

tq for ur code...

very simple and helpful...tq..

# September 16, 2008 1:01 AM

JB Burayag said:

Thank you very very much for this very awesome post, very helpful to us...

# October 8, 2008 12:34 AM

JOSEPH said:

I WANT TO PASS A VALUE FROM ONE FORM TO THE POPUP AND GET THE SAME VALUE FROM THE POPUP TO ANOTHER FROM.

IF ANYBODY KNOW THE CODE IN VB. PLEASE EMAIL ME ON sels2005j@yahoo.com

# November 4, 2008 4:35 AM

JOSEPH said:

how can get a popup value from the parent form

# November 4, 2008 6:01 AM

farazsk11 said:

@Joseph:

You can pass the value as a QueryString to the popup like this

window.open("popup.aspx?MyPopupValue=SOME_VALUE","List","scrollbars=no,resizable=no,width=400,height=280");

in the popup windows's load event you can write

IF Request.QueryString("MyPopupValue") IsNot Nothing Then

    Dim strValue as String = Request.QueryString("MyPopupValue").ToString()

    'Rest of your code for using the value you received.

End IF

# November 4, 2008 6:13 AM

amanbre said:

farazsk, i used your code in my website and i get 2 different result..

1-firefox is working fine

2-i.explorer doesnt close the popup and return my values

how can we modifiy the jscript codes to work with bot firefox and i.explorer??

# November 25, 2008 6:10 AM

farazsk11 said:

@amanbre:

When I wrote the code I tested it only with IE so I guess it should work with IE. Please check if it gives any javascript error.

# November 25, 2008 7:55 AM

amanbre said:

i found the error and it is not about yor code..thx for returning

# November 28, 2008 5:35 AM

TRaj said:

Hi, Faraz,

   Can you do the same thing using C# please.

Ta

# December 16, 2008 4:50 PM

farazsk11 said:

@TRaj:

the code includes C# implementation as well.

# December 17, 2008 8:36 AM

hani (OptimaSoft) said:

i worked with this subject and every thing is worked fine but when i pass value and store is in textbox and then prerender page the value being null

# December 29, 2008 7:56 AM

farazsk11 said:

@hani:

I guess in prerender event ViewState of a control is not written or updated and since we were setting the value using javascript probably this could be the reason. Any way try to get it on Load event if it works then this should be the problem of ViewState as controls retain their values using ViewState.

# December 30, 2008 12:24 AM

ramesh said:

Its perfectely running. if you not running properly add attribute of onRowdatabound="Function name". and change the textbox name of the script function in pop up pages

# January 13, 2009 6:38 AM

Ann said:

I have a popup with listview. One of the items on it I made a linkbutton. I did as explained in the article. I call the function in listview1_itemcommand instead of GridView1_RowDataBound

The problem is that the user needs to click twice on that linkbutton. First time the page posts back and only second click does the job and returns value to the main window and popup closes.

Why does not it work on first click?

I spent 2 days on it, please help me.

# January 15, 2009 8:18 PM

Ann said:

I am sorry it is DataList control(not listview) that I am working with in popup. So it is DataList_ItemCommand where I call the function.

# January 15, 2009 8:36 PM

farazsk11 said:

@ Ann:

use DataList_ItemDatabound event. Try to write this in ItemDatabound event

if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)

{

    ((LinkButton)e.Item.FindControl("LinkButtonID")).Attributes.Add(("onclick", "javascript:GetRowValue('" + ((Label)e.Item.FindControl("lbID")).Text + "')");

}

Replace LinkButtonID with the actual LinkButtonID in the DataList. Here I assume that lbID is a label you are using to display IDs in the DataList.

Hope it will solve your problem now.

# January 17, 2009 1:00 AM

Ann said:

farazsk11

Thank you so much, it works!

# January 20, 2009 12:53 PM

aftabg said:

excuse me

I tested your first & second examples

in first example(Feb 16 2008) you have a master page in your parent page(like me)

but in second example(July 23 2008) you don't use master page

second example work very well but with masterpage,the popup window dosen't close and don't pass values to parent page.

please help me and say me what can I do?

I have 2 pages that are  derived from  MasterPage(like first example)

how must i write my code to pass values & close pop up page?

# June 2, 2009 5:57 AM

farazsk11 said:

Hi aftabg,

I wrote an example again to check if this code works with MasterPage or not. This time the only difference b/w following code and the code mentioned in the blog is now I am passing the ID of the parent page control to the popup as query string.

NOTE: Please also note that I tested the code with IE7 and FireFox 3.0.10 and it works fine.

<!-- Code for parent page -->

<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="parent.aspx.cs" Inherits="parent" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">

</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">

<script type="text/javascript">

  function OpenPopup(ctrlid)

  {

      window.open("popup.aspx?ctrlid=" + ctrlid,"List","scrollbars=no,resizable=no,width=400,height=280");

      return false;

  }

</script>

<asp:TextBox ID="txtPopupValue" runat="server" Width="327px"></asp:TextBox>

<asp:Button ID="Button1" runat="server" Text="Show List" />

</asp:Content>

public partial class parent : System.Web.UI.Page

{

   protected void Page_Load(object sender, EventArgs e)

   {

if (!IsPostBack)

{

this.Button1.Attributes.Add("onclick", "javascript:return OpenPopup('" + this.txtPopupValue.ClientID + "')");

}

   }

}

<!-- Code for popup page -->

%@ Page Language="C#" AutoEventWireup="true" CodeFile="popup.aspx.cs" Inherits="popup" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "www.w3.org/.../xhtml1-transitional.dtd">

<html xmlns="www.w3.org/.../xhtml">

<head runat="server">

   <title></title>

   <script language="javascript">

       function GetRowValue(ctrlid, val)

       {

           window.opener.document.getElementById(ctrlid).value = val;

           window.close();

       }

   </script>

</head>

<body>

   <form id="form1" runat="server">

   <div>

    <asp:GridView ID="GridView1" runat="server"

     onrowdatabound="GridView1_RowDataBound">

     <Columns>

      <asp:TemplateField>

       <ItemTemplate>

        <asp:Button ID="btnSelect" runat="server" Text="Select" />

       </ItemTemplate>

      </asp:TemplateField>

     </Columns>

    </asp:GridView>

   </div>

   </form>

</body>

</html>

public partial class popup : System.Web.UI.Page

{

   protected void Page_Load(object sender, EventArgs e)

   {

if (!IsPostBack)

{

DataTable dt = new DataTable();

dt.Columns.Add("title");

dt.Columns.Add("url");

dt.Columns.Add("date");

dt.Rows.Add("Title1", "www.title1.com", "13:00:00");

dt.Rows.Add("Title2", "www.title1.com", "14:13:00");

dt.Rows.Add("Title3", "www.title1.com", "15:14:00");

dt.AcceptChanges();

this.GridView1.DataSource = dt;

this.GridView1.DataBind();

}

   }

protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)

{

if ((e.Row.RowType == DataControlRowType.DataRow))

{

((Button)e.Row.FindControl("btnSelect")).Attributes.Add("onclick", "javascript:GetRowValue('" + Request.QueryString["ctrlID"].ToString() + "', '" + e.Row.Cells[1].Text + "')");

}

}

}

# June 3, 2009 3:59 AM

aftabg said:

hi farazsk11

Thank youuuuuuuuuuuuuuuuuuuuuuuuuuuuuu

veryyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy

muuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuch

that works very well

thank you for your help

# June 7, 2009 12:13 AM

aftabg said:

hi farazsk11

thank youuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu

veryyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy

muchhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh

that works very well

thank you for your help

# June 7, 2009 1:22 AM

Manish said:

Awesome code, thats working perfectly.

# June 29, 2009 8:01 AM

S.Arunkumar said:

Thanks. This code is perfect, I modified as per my requirement and implemented.

# June 30, 2009 8:01 AM

deepan said:

thanks . this helped me in right time.

# July 29, 2009 2:31 AM

Alice said:

I'm going to try the code again, but please next time try to present a full solution (it will be great if attached), because most of us are beginners. Thanks anyway.

# August 4, 2009 12:37 AM

Diemie said:

Wow, this help me so much. Thank you, thank you

# August 21, 2009 9:33 PM

SenthilVel said:

Hi,

I am using ASP.net2.0. I am having Parent page(which is Master page implemented) and Popup Page. Also i am having 10 columns in SQL server(Say col1,col2,col3,...col10). In my parent page i having 10 textboxes for each value.

Now my problem is, I want show the Col2,col3, col4 and col7 in Popup. When i select any row of columns in the popup window, all the values (which are not shown ) should also bind with the controls in Parent tables..How to do this using Javascript

Note:

1)I know how to Open Popup using Javascript.                                                              

2)I know how to bind all the value when displaying all the columns values in Popup.

TIA

# August 31, 2009 3:32 AM

Manikandan said:

can anyone say me how to get the values of selected rows in datagrid to a window form?

# September 10, 2009 6:03 AM

mwulfe said:

farazsk11 -

Great code.  Would it be possible to see it in VB?

Thanks!

# January 4, 2010 9:34 PM

farazsk11 said:

@mwulfe:

Hi,

Please check the sample code in the blog and look for the following line:

--- .vb file if vb.net is the language ---

You will find the implementation in VB.

# January 6, 2010 10:43 AM

Kenn said:

nice code...

would you give also example using c# form...

# February 23, 2010 2:10 AM

farazsk11 said:

@Kenn:

Hi, C# example is there in the blog. Incase if you couldn't find it, let me paste it here as well.

protected void Page_Load(object sender, EventArgs e)

{

if !(IsPostBack)

{

 this.Button1.Attributes.Add("onclick", "javascript:return OpenPopup()");

}

}

protected void GridView1_RowDataBound(object sender, System.Web.UI.WebControls.GridViewRowEventArgs e)

{

   if ((e.Row.RowType == DataControlRowType.DataRow)) {

       ((Button)e.Row.FindControl("btnSelect")).Attributes.Add("onclick", "javascript:GetRowValue('" + e.Row.Cells(1).Text + "')");

       //assuming that the required value column is the second column in gridview

   }

}

# February 23, 2010 3:45 AM

Nirmallya said:

Thanks Faraz , for ur valuable code.

# March 5, 2010 1:41 AM

Lou said:

hi Faraz,

if I have a gridview defined like this

<asp:TemplateField HeaderText="">

                   <ItemTemplate>

                       <asp:LinkButton ID="UploadCompleteLinkButton" runat="server" CommandName="UploadComplete" Text="Upload complete" CommandArgument='<%# Eval("CustomerId")%>' OnClick="btnPopup_Click"> </asp:LinkButton>

                       <ajax:ModalPopupExtender ID="mpe" runat="server"

                           TargetControlID="UploadCompleteLinkButton"

                           PopupControlID="PopupPanel" Drag="false"

                           BackgroundCssClass="ModalPopupBG"

                           CancelControlID="btnCancel"

                           PopupDragHandleControlID="PopupHeader">

                       </ajax:ModalPopupExtender>

   <asp:Panel ID="PopupPanel" style="display: none;" runat="server" CssClass="ModalWindow">

           <div class="popup_Container">

               <div class="popup_Titlebar" id="PopupHeader">

                   <div class="TitlebarLeft">Confirmation</div>

                   <div class="TitlebarRight"></div>

               </div>

               <div class="popup_Body">

               <p>

                   Are you complete uploading trace file(s) to the server?

               </p>

               Id is:

                   <asp:Label ID="popupIdLabel" runat="server" Text='<%# DataBinder.Eval(Container.DataItem,"CustomerId")%>' ></asp:Label>

               </div>

               <div class="popup_Buttons">

                   <asp:Button ID="btnConfirm" runat="server" Text="Yes" OnClick="ConfirmExecution_Click" />

                   <asp:Button ID="btnCancel" runat="server" Text="No"  />

               </div>

           </div>

   </asp:Panel>    

                   </ItemTemplate>

The popupIdLabel.Text shows a valid CustomerId,  how can I pass this value to ConfirmExecution_Click in code behind so I could grab the CustomerId to update the database?

thanks.

# August 25, 2010 1:25 PM

Tanveer said:

How To Pass Value from User Web Control to Parent ASPX Page

# August 25, 2010 3:14 PM

balaji said:

Hey thanks I have also done my logic based

# December 16, 2010 6:24 AM

weblogs.asp.net said:

Passing value from popup window to parent form s textbox.. Great! :)

# May 12, 2011 7:27 AM

Mohammed Haq said:

Thanks for this great article. You saved my hours of effort.

# November 3, 2011 7:32 AM

bryan said:

gud day,

I tried your code but i encountered an error:

Invalid postback or callback argument.  Event validation is enabled using <pages enableEventValidation="true"/> in configuration or <%@ Page EnableEventValidation="true" %> in a page.  For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them.  If the data is valid and expected, use the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation.

i already tried to insert this : <%@ Page EnableEventValidation="true" %> into may page directive but the error still occurs.

hope you can help me...

# January 30, 2012 10:25 PM
Leave a Comment

(required) 

(required) 

(optional)

(required)