Monday, October 29, 2012

Microsoft JScript runtime error: Sys.WebForms.PageRequestManagerServerErrorException

While working on Asp.Net application with Master Pages, Child pages and web user controls getting following error is very common. Which is related to Events related to Web user controls, e.g. Button click event...

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.

In such cases as error says we simply have to disable EventValidation in @Page directive and error disappears.

<%@ Page EnableEventValidation="false" %>
OR enable it for whole application by modifying it in web.config file

<%@pages enableeventvalidation="false">
<%@/pages>
Submit this story to DotNetKicks

2 comments:

InnomaxMediaLLP April 22, 2013 at 2:09 PM  
This comment has been removed by a blog administrator.
caiteyjacquetta March 3, 2022 at 11:04 PM  

Jumba Casino & Hotel - JamBase
With more than 140 slot 문경 출장샵 machines, electronic table games, and live 양산 출장샵 dealer casino 김해 출장마사지 action, Jumba Casino & Hotel has something for everyone. 수원 출장안마 Come 구리 출장샵 experience it