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. 在本机上测试不会,为什么传到服务器上就出现这个错误了?
注意:此属性在 .NET Framework 2.0 版中是新增的。 获取或设置启用事件验证的值。
在回发方案中启用事件验证。如果验证事件,则为 true;否则为 false。默认值为 true。
但这样可解决问题:<%@ Page EnableEventValidation="false" %>