I've been getting a strange error lately when enabling some complex functionality using update panels.  The error looks like this:

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 know that this error is caused by a postback modifying the output of a control in another update panel other than the one that triggered the postback.  It's one of those situations where you can shoot yourself in the foot if areas of functionality on a page are not grouped together in the same update panel.

It's easy to fix once you know what the problem is, but debugging it is a major problem.  I found an article written recently by someone on my blogroll about this exact issue and tips for debugging it. 

Conditional UpdatePanel and Event Validation

Trackbacks

No Trackbacks

Comments

David :

Thanks for the post, I've been working on this myself and it was helpful.

Link

Leave a Comment