I've an ASP.Internet located website which shows a listing of results like a DataGrid or ASP.Internet Repeater with paging of results.
If a person scrolls rapidly with the pages by pressing the priorOrSubsequent tabs sometimes an HttpUnhandledException is tossed and also the debug page made rather than the following report on results.
The debug screen is the following:
System.Web.HttpUnhandledException: Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> System.ArgumentException: 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. at System.Web.UI.ClientScriptManager.ValidateEvent(String uniqueId, String argument) at System.Web.UI.Control.ValidateEvent(String uniqueID, String eventArgument) at System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument) at System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) --- End of inner exception stack trace --- at System.Web.UI.Page.HandleError(Exception e) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest() at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) at System.Web.UI.Page.ProcessRequest(HttpContext context) at ASP.contacts_default_aspx.ProcessRequest(HttpContext context) at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
I've discovered mention of the this kind of error at http://blogs.msdn.com/amitsh/archive/2007/07/31/why-i-get-invalid-postback-or-callback-argument-errors.aspx
however the solution suggested would be to set to false, but this appears to produce a security hole. Your comments ought to recommend several options, but all appear rather complex given that they require adding code to each single DataGrid or Repeater control used throughout my website.
It is possible to more general solution that you can do without compromising security?
The hidden fields in your page aren't being provided on postback. You will find a number of these fields, and they're usually needed for that 'magic' that ASP.Internet provides.
Inside your page directive place the enableEventValidation=false inside your page directive to power it down, however that may not be desirable.
Finally, I'm fairly certain this exact problem was lately fixed inside a Service Pack or perhaps in 3.5.
-- EDIT --
I simply found the setting: RenderAllHiddenFieldsAtTopOfForm
Based on MSDN is supported within the following versions: 3.5 SP1, 3. SP2, 2. SP2