Last post Mar 04, 2010 09:00 AM by raheemaleem
Feb 25, 2007 04:10 AM|sreekanths|LINK
I am new to this forum and this is my first post.
This solution is for those who are experiencing
1. Runtime errors with event validation issues
2. Runtime errors (like web farm error) when using GridView, FormView, DetailsView with DataKeyName set.
All solutions to this problem referred to either removing use of datakeynames or disabling event validation.
As pointed out in some posts this problem occurs mostly with firefox. I have noticed that before downloading the source code fully, firefox begins rendering the page and loading images on the go. this slows down downloading of source code. (I do not know
page loading algorithm of firefox. but from my experience. u can check this by browing some forums with lot of high resolution images in it. u can experince diffrence in ie and firefox) . So when u navigate fast through some websites that contain a lot of
data, u might probably end up in clicking a button casing a postback even before the __EVENTVALIDATION field is in the form of the page u submit back. This is the cause of error.
My Approach is to block the user from submitting the page before __EVENTVALIDATION field is in the scope of the form.
However this solves the problems associated with datakeynames of gridview (2nd error) as the new field introduced by it
__VIEWSTATEENCRYPTED comes before the __EVENTVALIDATION field in the form.
Here is the solution.
Now call the function check in the form's 'onsubmit' event
This restricts the user from generating a postback before the EVENTVALIDATION data is loaded into the hidden text field.
I got the problem solved with this. the only disadvantage is that it needs all page source (not images and videos) to be loaded into the browser before the user can submit the form.
Mar 04, 2010 09:00 AM|raheemaleem|LINK
You can also try this link
I ran into this same problem and added a machine key section to the system.web portion of the web.config and set the
pages key like this
No more errors.