exception:Invalid postback or callback argument. Event validation is enable, caused by jQuery

1.3k views Asked by At

Well I've been reading about this (actually not here in stackOverflow), and I have a few question and need some advice about this "old" topic.

Firtst at all, what I do?

Change value of a on "onclientclick" event using a function on javascript and enable a control in the same function. This dropdown list use ajax toolkit cascade extension to populate two more dropdown list. Then the save the new information using the jQuery AJAX method using a webService. But I have another button that submit the whole aspx page and then I got the expcetion "exception:Invalid postback or callback argument. Event validation is enable...."

1.- First, easy and fast option is to disable Event Validation in aspx page, but until I've read this is not a good idea.

2.- Use this: http://msdn.microsoft.com/en-us/library/ms223395.aspx I don't really understand these examples :(

3.- Say good bye to the user experiencie and use "classical" submit/postback method.

I really really don't want the number 1 and 3. I would like to fully understand the option 2 and keep the user experiencie and the security of ASPX.

I'll be really grateful of any advice. Thank you.

Updated I guess this article cover and explain very well this known issue (or feature): http://odetocode.com/blogs/scott/archive/2006/03/21/asp-net-event-validation-and-invalid-callback-or-postback-argument-again.aspx

Updated 2 Another excellent post (seen here at stackoverflow): http://johanleino.wordpress.com/2009/11/17/cascadingdropdown-casues-invalid-postback-or-callback-argument-error/

Update 3 This is another cause for the exception: ASP.NET Master Page: Event Validation Error

0

There are 0 answers