Invalid postback or callback argument.

  • Thread starter Thread starter Ray Stevens
  • Start date Start date
R

Ray Stevens

Anyone see this error that appears to have cropped up with the RTM version
of .NET:
BASE EXCEPTION:: 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.

I'm not sure what to do about it.
 
This error ocurs when the layout of the form being submitted differs from
what has been defined on the server side and you have validation enabled.
This usually caused by adding new fields, or items to forms using client
script, or the end user submits the form before the page has finished
rendering because the server needs the following line

<input type="hidden" name="__EVENTVALIDATION" id="__EVENTVALIDATION"
value="somestringofgiberish"

to be corectly rendered before submitting the form. It is a feature to stop
people submitting their own forms to your ASP.net page.
 
Back
Top