Invalid postback or callback argument

来源:互联网 发布:80端口被占用怎么解决 编辑:程序博客网 时间:2024/04/30 14:18

在ASP.NET2.0中出现如下错误;

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.

解决方法:
在.aspx页面中的<%@ Page …… %>语句中加上属性EnableEventValidation="false"

关于 EnableEventValidation可以参考:http://msdn2.microsoft.com/zh-CN/library/system.web.configuration.pagessection.enableeventvalidation(VS.80).aspx

  
原创粉丝点击