Invalid postback or callback argument

M

Mike P

I have added a couple of buttons to my ASP.NET 2.0 page. which both are
meant to do pretty simple things, a Back button and a Submit data
button. But I get this error whenever I click either of the buttons :

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.


How do I prevent this error?
 
G

Guest

This event usually happens when validation is enabled and you have either,
added fields to the form on the clientside and/or you have submitted the form
before the following hidden field has been rendered,

<input type="hidden" name="__EVENTVALIDATION" id="__EVENTVALIDATION"
value="/wEWBALDgtmMCQLmwMTlCwLT/KSEAQKt7K6OC7Qmo2W+MsXlihjcAaIc/unn8Nw3" />.

Basicaly ASP.net is trying to make sure that the form being submitted is the
same form that it rendered.
 
M

Mike P

Figured this out myself...a </form> tag that shouldn't have been there
was causing this error.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,930
Messages
2,570,072
Members
46,521
Latest member
JamieCooch

Latest Threads

Top