Event validation error and AJAX

J

john_c

Sometimes I get this error in an aspx page:

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.

The error occurs because I'm adding or removing controls/items via
AJAX. This gets out of synch with ASP.NET 2.0 and causes it to throw
the error. Setting EnableEventValidation=false is supposed to make
the error go away.

I do have places where users can enter free text. If I want to use
AJAX this way, will I have to manually validate the entered in text.
Are there any scripts or techiniques to help with this?

Thanks,
John
 

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

Forum statistics

Threads
473,773
Messages
2,569,594
Members
45,120
Latest member
ShelaWalli
Top