Modifying listbox values with jQuery in WebForm not posting back
Posted
by Peter
on Stack Overflow
See other posts from Stack Overflow
or by Peter
Published on 2010-05-05T12:37:59Z
Indexed on
2010/05/05
12:48 UTC
Read the original article
Hit count: 527
asp.net-webforms
|jQuery
When hitting a button, an error would occur:
System.Web.HttpUnhandledException: Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> System.ArgumentException: Invalid postback or callback argument. Event validation is enabled using in configuration or 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 then added EnableEventValidation="false" into my @Page directive, which fixed the error. Now after manipulating the listbox, the new values in the listbox are not posted back to the server. How can I solve this?
© Stack Overflow or respective owner