在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
本文介绍了在ASP.NET2.0中遇到的一个常见错误:Invalid postback or callback argument。此错误通常与启用事件验证有关。文章提供了禁用事件验证的方法,并链接了MSDN文档供进一步了解。
797

被折叠的 条评论
为什么被折叠?



