我创建了一个项目交换器控件,包含两个列表框和一些按钮,允许我在两个列表之间交换项目.交换是使用javascript完成的.我还在列表中上下移动项目.基本上,当我将项目移动到右侧的列表框时,我将元素(GUID)的数据键存储在隐藏字段中.在回发时,我只是从字段中读取GUID.一切都很好,但在回发后,我得到以下异常:
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.
我准备了一个测试应用程序.您所要做的就是下载存档并运行项目.在网页上选择3项,按全部添加,然后将第三个元素向上移动一级,然后点击“按钮”.错误将显示出来.关闭事件验证绝不是可以接受的.任何人都可以帮助我,我已经花了两天没有找到解决方案.