无效的回发或回调参数.. [英] Invalid postback or callback argument..

查看:89
本文介绍了无效的回发或回调参数..的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好我正在使用网格视图来填充数据库中的数据,但是当我点击网格视图的下一页按钮时,我收到以下错误



无效的回发或回调论点。使用< pages enableeventvalidation =true>启用事件验证在配置或<%@ Page EnableEventValidation =true%>在一个页面中。出于安全考虑,此功能可验证回发或回调事件的参数是否来自最初呈现它们的服务器控件。如果数据有效且符合预期,请使用ClientScriptManager.RegisterForEventValidation方法注册回发或回调数据以进行验证。



我看到某处要添加以下行aspx页面



<%@ Page EnableEventValidation =false%>

当我使用它时,它会给出另一个异常

指令'Page'未知

Hi I am using grid view to populate data from database, but when I click next page button of grid view I am getting following error

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.

I saw somewhere to add following line to aspx page

<%@ Page EnableEventValidation="false" %>
when I used it, it gives another exception
The directive 'Page' is unknown

推荐答案

您应该使用<%@ Page EnableEventValidation =true%> ;页面指​​令不是假的
Hi you should use <%@ Page EnableEventValidation="true" %> not false is page directive


这篇关于无效的回发或回调参数..的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆