mandelbug wrote:You may need to add this attribute to <pages> tag in web.config file: enableEventValidation="false"
blindahl wrote: mandelbug wrote:You may need to add this attribute to <pages> tag in web.config file: enableEventValidation="false" I've had the same problem - but setting the above value didn't change anything.
Yes I believe it's a bad work around.
One thing that I found was that if you are databinding in the load event you will get this error if you don't first check for postback. I was having this problem after I added some client script to add a confirmation popup. Just wrap your databinding in an if(IsPostback) block.
Joe
My receiving this error was related to the use of the AJAX ScriptManager when I made a call to ScriptManager1.Page.ClientScript.RegisterClientScriptBlock(). I had to remove the call to RegisterClientScriptBlock on my master page to get around the 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.
Hi, we were having these errors extensively on our ASP.NET 2.0 Ajax enabled site. It appeared to be happening on slower connection speeds were users were attempting login before the entire page downloaded. I built a user control, added this to our global master page, and the errors were fixed. Here is the code:
public
{
Page.ClientScript.RegisterStartupScript(
}
The RegisterStartUpScript method places the code at the end of the document, thus if this script does not run it cannot set the hidden field. The Submit checker will not allow the user to "Submit" until this field is set.
This has worked for us, we were getting many of these errors and now none.
Hope this helps those with these issues
Where should we be databinding then?
One cause of this error that caused me to rip my hair out until I found a solution, was that I had initiation code in the Page_Load event that was not inside of an if (! IsPostBack  condition. Therefore the initiation reran. This (I believe) caused the view state to be modified in a way that made .NET unhappy and throw the error. Once I put the initializtion code inside of an if (! IsPostBack  condition, the problem was fixed.
Note too that setting EnableEventValidation=false doesn't work. When I tried this, the event simply didn't fire.
Copyright© 2008 Telligent Systems Inc. All rights reserved CommunityServer.com • Telligent.com