in your ASP.NET application while clicking a button?
The reason for this error is ASP.NET renders some hidden fields, such as the __EVENTVALIDATION field near the bottom of the form, immediately before the closing tag. If event validation is enabled and a user clicks on a button before the page is rendered completely, then __EVENTVALIDATION field is not included in the data that is being posted. Therefore, the .NET Framework treats this postback as invalid and brings up this error.
To resolve this error, a lot of developers set the page property "EnableViewStateMac" to false. Although this may resolve the error in some cases, this is not the preferred way.
To resolve this error, if you are using .NET 3.5, upgrade to .NET 3.5 SP1. If you are using .NET 2.0, then upgrade to .NET 2.0 SP2.
By default, in ASP.NET 3.5 SP1, all system-generated hidden fields are rendered at the top of the page. This makes sure that the information in these fields is sent to the server even if a postback is performed, before the page has finished loading.
If you want to render system-generated fields at the bottom of the page, set the RenderAllHiddenFieldsAtTopOfForm property to False.
great tip ! thanks for sharing...
ReplyDeleteWelcome Robin..
ReplyDeletewow.its something interesting
ReplyDeleteyes Varun.. .. This will be challenging when we move to further years ..
ReplyDeleteWelcome