【发布时间】:2015-03-02 12:33:35
【问题描述】:
我们有这个列表视图的更新面板。
<asp:UpdatePanel ID="searchResultUpdate" runat="server">
<Triggers><asp:AsyncPostBackTrigger ControlID="submitBT"/></Triggers>
<ContentTemplate>
<div id="status" runat="server" />
<asp:ListView ID="searchResultLV" runat="server" OnItemCommand="searchResultLV_ItemCommand" DataKeyNames="Message_id" OnItemDeleting="searchResultLV_ItemDeleting">
<LayoutTemplate>
<table class="table table-hover">
<tr runat="server" id="itemPlaceholder" />
</table>
</LayoutTemplate>
<ItemTemplate>
</ItemTemplate>
</asp:ListView>
</ContentTemplate>
</asp:UpdatePanel>
使用 searchResultLV.DataBind() 更新列表视图后;在部分回发中并在相应的master.page中单击此按钮
<button id="LogoutAnchor" runat="server" onserverclick="LogoutAnchor_ServerClick" class="btn btn-default btn-flat">Sign out</button>
在调用函数(LogoutAnchor_ServerClick)之前,发生了错误:
[ArgumentException: 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.]
这是一个错误吗?我们不能在服务器上使用部分回发和完整回发吗?
【问题讨论】:
标签: c# asp.net listview updatepanel