By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,952 Members | 1,921 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,952 IT Pros & Developers. It's quick & easy.

Event validation error and AJAX

P: n/a
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

Feb 28 '07 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.