Gridview中的按钮单击事件 [英] button click event in Gridview

查看:132
本文介绍了Gridview中的按钮单击事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用更新面板,在该更新中,我使用一个gridview
在gridview中有一个按钮.
在此按钮的单击事件上,它给我以下错误

"Microsoft JScript runtime error: Sys.WebForms.PageRequestManagerServerErrorException: 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 am using update panel in that update i use one gridview
In gridview there is button.
On click event of this button it gives me following error

"Microsoft JScript runtime error: Sys.WebForms.PageRequestManagerServerErrorException: 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 need the solution

推荐答案

尝试通过以下方式进行查找

添加更新面板触发器 [ ^ ]
try to find out in the following way

Adding an Update Panel Trigger[^]


使Page指令中的 EnableEventValidation = True .


,阅读错误消息,然后按照提示进行操作.您尝试过吗?
So, read the error message, and do what it says. Did you try that ?


这篇关于Gridview中的按钮单击事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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