I have a situation similar to yours, where did you put the code to databind the gridview? Can't figure out any other solution than putting it in the page_load...
I have some code thaht was working a while ago, which now is not?
There is a repeater inside a repeater. The control of when biding takes place is carefully controlled, and everything used to work OK.
Now, all of the ImageButtons in the inner Repeater which have the command name/argument set, cause a postback, but are never caught in the ItemCommand event
Changing one of the buttons to a LinkButton instead works OK
So what is the difference between these two button types?
I will investigate further today, but it seems wrapped up with the Page Event Validation process, since if you set it to true for the page, then in the inner repeater, a link button works OK, but the Image button causes the page to fall over
---
OK, here is a link to what I found so far as a discrepency between the LinkButton and ImageButton used in the same way in the same place. I.e. they exhibit different behavours given identical conditions
Hi all, you might be interested in another post of mine. A postback Text_Changed event is being raised for a textbox that is not actually rendered to the client (it's a different text box that raises the event) -
I am getting the same error :( In ma case,I have a gridview which contains a dropdownlist in each row and each dropdownlist has an "onchange" Javascript function,and when the user updates the dropdown lists,he will press a button (outside grid) to submit
the changes,here where the postback occurs on the button.So when the javascript function is called and then i press the submit button to confirm the changes,I got the same error!
(The javascript function is called in the RowDataBound function where each row is being binded) and databinding is called in the Page_Load!
Boddam
Member
347 Points
335 Posts
Re: error: enableEventValidation="true"/
Oct 23, 2006 07:48 AM|LINK
actually.. that wasnt the reason. Ignore my last post..
Pardon me [:P]
Flax
Member
145 Points
39 Posts
Re: error: enableEventValidation="true"/
Oct 28, 2006 04:41 PM|LINK
Hi,
I have a situation similar to yours, where did you put the code to databind the gridview? Can't figure out any other solution than putting it in the page_load...
adman666
Member
468 Points
71 Posts
Re: error: enableEventValidation="true"/
Nov 01, 2006 12:21 AM|LINK
Hi,
This will sove your problems, Wrap your databind in a If Not IsPostBack:
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If Not IsPostBack Then
End Sub
Thanks.
GeorgeM
Member
15 Points
3 Posts
Re: error: enableEventValidation="true"/
Nov 02, 2006 10:41 AM|LINK
I had same problem and as others have sayed the problem is from HTML code, prooly more <form> tags inside the main <form runat="server">.
Well at least i had form tag problem. In case anyone might have same problem check your html code first.
kamal H
Member
5 Points
1 Post
Re: error: enableEventValidation="true"/
Nov 08, 2006 05:47 PM|LINK
Thank you for your tip!
I had a datagrid with a command button. When the Command was clicked I got the same error as with all of us.
I just enclosed the Load Event statements inside postback condition as shown below, and it fixed my problem.
if not ispostback then
<statements....>
end if
Thanks,
Kamal
howellt
Member
4 Points
2 Posts
Re: error: enableEventValidation="true"/
Dec 19, 2006 02:04 PM|LINK
Thank you Thank you Thank you.
I have been working on this for a couple of frustrating days.
Placing the binding in the not ispostback block worked.
Thank you again.[:D]
sbyard
Contributor
5891 Points
1196 Posts
Re: error: enableEventValidation="true"/
Dec 20, 2006 10:41 AM|LINK
Just to complicate the issue further!
I have some code thaht was working a while ago, which now is not?
There is a repeater inside a repeater. The control of when biding takes place is carefully controlled, and everything used to work OK.
Now, all of the ImageButtons in the inner Repeater which have the command name/argument set, cause a postback, but are never caught in the ItemCommand event
Changing one of the buttons to a LinkButton instead works OK
So what is the difference between these two button types?
I will investigate further today, but it seems wrapped up with the Page Event Validation process, since if you set it to true for the page, then in the inner repeater, a link button works OK, but the Image button causes the page to fall over
---
OK, here is a link to what I found so far as a discrepency between the LinkButton and ImageButton used in the same way in the same place. I.e. they exhibit different behavours given identical conditions
http://forums.asp.net/1503471/ShowThread.aspx#1503471
mokeefe
Star
10850 Points
2098 Posts
Re: error: enableEventValidation="true"/
Dec 29, 2006 12:37 AM|LINK
Hi all, you might be interested in another post of mine. A postback Text_Changed event is being raised for a textbox that is not actually rendered to the client (it's a different text box that raises the event) -
http://forums.asp.net/thread/1496601.aspx
Surely disabling EventValidation across your whole site is a bad idea. If you must, do it on a Page by Page basis using the page directives.
Rgds,
Martin.
Martin.
For the benefit of all users please mark any post answers as appropriate.
langers
Member
4 Points
2 Posts
Re: error: enableEventValidation="true"/
Dec 29, 2006 05:49 PM|LINK
That seemed to resolve the issue for me. I simply moved my databinding to oninit
Hiba84
Member
343 Points
129 Posts
Re: error: enableEventValidation="true"/
Jan 09, 2007 06:15 AM|LINK
Hey,
I am getting the same error :( In ma case,I have a gridview which contains a dropdownlist in each row and each dropdownlist has an "onchange" Javascript function,and when the user updates the dropdown lists,he will press a button (outside grid) to submit the changes,here where the postback occurs on the button.So when the javascript function is called and then i press the submit button to confirm the changes,I got the same error!
(The javascript function is called in the RowDataBound function where each row is being binded) and databinding is called in the Page_Load!
which code shall I remove or change????
Thank u
Hiba