我有一個包含在更新面板內的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