我有一个包含在更新面板内的gridview。我使用gridvied中的按钮编辑gridview中的记录,它会更新面板回发(__doPostBack),然后更新GridView的数据集并尝试使用新的数据源刷新griview,但出现以下错误。在更新面板中刷新GridView
我重新绑定我的GridView控件如下,
gvwSearchResult.DataSource = dsP1.prSearchItem;
gvwSearchResult.DataBind();
UpdatePanel1.Update();
Uncaught Sys.WebForms.PageRequestManagerServerErrorException:
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.
Sys.WebForms.PageRequestManager._endPostBackScriptResource.axd:307
Sys.WebForms.PageRequestManager._parseDeltaScriptResource.axd:749
Sys.WebForms.PageRequestManager._onFormSubmitCompletedScriptResource.axd:584
(anonymous function)ScriptResource.axd:22
(anonymous function)ScriptResource.axd:1519
Sys.Net.WebRequest.completedScriptResource.axd:2924
_onReadyStateChange
任何想法?
编辑按钮是自动生成还是在模板中? – mslliviu 2012-03-12 07:41:24
这是一个模板字段 – Roshe 2012-03-12 07:45:23