Gridview中的按钮单击事件 [英] button click event in 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屋!