Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Mar 27, 2011 07:31 AM by master of the maze
Jul 17, 2006 05:43 PM|LINK
I had the same problem and would like to let you know how this problem appeared on my application.
I have a search page with a result table containing 1000 rows. Each row has a class (evenrow, oddrow) and eventually linked to a behavior. While this page was being rendered (taking 10 seconds to render), I clicked on the Search button again and I got
the error message.
Viewing the source while the page was being rendered showed that the HTML page was missing some hidden controls at the end of the page. The controls include some controls that were supposed to be generated by ASP.NET 2.0.
It makes sense that when I clicked the Search button again, some of the hidden controls were not reposted back; therefore, event validation failed.
Setting the enableEventValidation to false in <system.web> in web.config file fixed the problem. It is OK for my application to do this since it never had event validation prior to converting the application to ASP.NET 2.0.
Jul 28, 2006 02:28 PM|LINK
I have a similar problem with a GridView where the data source is the same datatable every time, but can be filtered for a different view of the information.
When the grid is "viewing" the whole datasource, it works fine, (items appears selected and index changed code does it's thing) but if the data is filtered, and you select an item on the grid, I get this error.
When I set EnableEventValidation to false, selecting an item on the grid does not recognize that an item has been chosen. The item does not look selected and the code is not performed.
Any ideas would be greatly appreciated.
Aug 04, 2006 04:18 PM|LINK
I encountered same issue and I found a solution. I hope this will help somebody.
I had a gridview and delete button in each row. This error shows up when I hit one of the delete button. Postback from any other component was fine. If I turned EnableEventValidation false, delete button event won't be fired.
In my case, I had a code inside of Page_Load event handler, which updates gridview (using databind) before it comes to delete button's event handler. I removed this code then it worked. What happened is, my code updated the component
(delete button) which fired postback. I guess this changed control's ID (or checksum) and CLR found mismatch between original one.
So why don't you look into your code again and see if you have any chance to update the component which fired postback event.
Sep 06, 2006 02:55 PM|LINK
To add to the puzzle, i was having the same error message after adding some Atlas components to my web page (an update panel and collapsable panel extender).
My page has a few user controls, the one i added Atlas functionality to being a login box. If the user logs in then the box disappears from the page and another box (another user control) moves up the right hand side of the page.
The seemingly simple and most elegant solution I was using prior to adding atlas functionality, was to this.Visible = false; in an image button event handler to hide the user control.
After adding the collapsable panel extender and associated Atlas-related stuff, things started going wrong. [:^)] Whenever the user control was hidden, clicking something else on the page (a control that forces a full postback) would fling up this most unhelpful
After a lot of frustration, I removed the line settin the user control's visibility to faslse (referred to above) from the imagebutton event handler, and hey presto, problem solved.
The reason for the error, as previously pointed out, is that the ASP.NET controls collection generated when the page is first instansiated, is not updated when Atlas posts back the new AJAX-ified event handler. In other words, ASP.NET/IIS expected there
to be a bunch of login box user control related data posted back to the server on the next button click. There wasn't because according to ASP.NET/IIS, the user control was thus hidden therefore no post-back related data was epected. Having thought about
this while writing this post, it actually makes sense.
the script runs and all control-related info is posted back. This is a doozy of an issue, so it really boils down to designing the page slightly differently ensuring that a page's control structure is not modified between round-trips to the server at either
end, or the page will become "out of sync" between ASP.NET and the cliet browser.
If anyone has info on the contrary, I'd be keen for an explanation and work-around.
Sep 06, 2006 03:03 PM|LINK
Sorry I have my wires crossed there:
ASP.NET/IIS DOES NOT expect there to be a bunch of login box user control related data being posted back, because according to IIS, the user control is hidden, thus no control related information would have been generated when the page was first produced.
Oct 03, 2006 06:34 PM|LINK
Ok, I have the same question pretty much. I have a datagrid with two buttons in it. A function called DataGrid2_Command adds both buttons during Page_Load. The odd thing is, one button loads up, while the other doesn't. I'm unsure of what to do. I've
tried to set the EnableEventValidation to false, but that hasn't helped. If anyone has a clue, please fill me in.
Oct 03, 2006 06:46 PM|LINK
Read this article you should have some idea. Then you can probably deal with it.
Oct 03, 2006 07:18 PM|LINK
Oct 15, 2006 02:27 AM|LINK
Hello, i had a similar problem, after reviewing my source code after not wanting the decrease in security disabling the validation, i found i had 2 </form> tags. I removed one of these and it worked fine.
It appears this error can occur when calling controls outside the scope of the form too.
Oct 23, 2006 07:40 AM|LINK
I had the same error message and in my case I found a solution in clearing the viewstate. viewstate.clear()
Depends on situation of course, worked out well for me.