Click here to Skip to main content
15,893,564 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I am using server side controls and also clientside scripting when I am clicking on server control
I getting below error

XML
Microsoft JScript runtime error: Sys.WebForms.PageRequestManagerServerErrorException: Invalid postback or callback argument. Event validation is enabled using 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 resolved it by using
<pages enableeventvalidation="false" />

but I do not want to use it.I want to know where is the exact issue?
How can I know that issue?How can I resolve?
Posted
Updated 16-Jun-13 23:53pm
v2

1 solution

In every PostBack, ASP.NET validates the request and excecutes the event validation. It will check for the event which is fired and the control that is firing the event. If the controls are not expected to fire such event, then this exception will be thrown.

But when using UpdatePanels, these errors are inescapable. So, the only option is to set EnableEventValidation property to fase.


--Amit
 
Share this answer
 
Comments
syna syna 17-Jun-13 9:02am    
I have deleted updatepanel but still I am getting same error

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