Click here to Skip to main content
15,041,025 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi anyone can help in this problem of binding the data with JSON , but when click on button and page post back, i face the problem as below:

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.

Please help and thank advance for helping.

•Disable eventvalidation (bad idea, because you lose a little of security that come with very little cost).
•Use ASP.NET Ajax UpdatePanel. (Put the listbox in the Updatepanel and trigger a update, if you add or remove listbox. This way viewstate and related fields get updates and eventvalidation will pass.)
•Forget client-side and use the classic postback and add or remove the listitems server-side.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900