我在未触发的更新面板中有一个按钮(btnTransferAccept)。我将它添加为触发器,但它仍然什么也不做。该按钮应该触发 javascript 警报。如果我删除更新面板之外的按钮,它工作正常。
有任何想法吗?谢谢
这是我的代码:
<asp:UpdatePanel ID="pnlTransferOwnership" ChildrenAsTriggers="true" runat="server" >
<Triggers>
<asp:AsyncPostBackTrigger ControlID="gvTransferOwner" />
<asp:AsyncPostBackTrigger ControlID="btnTransferAccept" />
</Triggers>
<ContentTemplate>
<asp:Gridview id="gvTransferOwner" CellPadding="0" GridLines="None" CellSpacing="0" runat="server" AutoGenerateColumns="false"
onrowcommand="gvTransferOwner_RowCommand">
<Columns>
<asp:TemplateField>
<ItemTemplate>
<asp:HiddenField ID="hfID" Value='<%#Eval("ID") %>' runat="server" />
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="FirstName" HeaderText="First Name" />
<asp:BoundField DataField="LastName" HeaderText="Last Name" />
<asp:BoundField DataField="EmailAddress" HeaderText="Email Address" />
<asp:buttonfield buttontype="Button" commandname="Select" headertext="Transfer" text="Select" />
</Columns>
</asp:Gridview>
<div class="ui-dialog-buttonset">
<asp:Button ID="btnTransferAccept" runat="server" CssStyle="display: none;" Text="Transfer" cssClass="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" />
</div>
</ContentTemplate>
</asp:UpdatePanel>