UpdateProgress 问题
下面的代码,如果UpdateProgress放入UpdatePanel中时,我去掉AssociatedUpdatePanelID属性,一切正常.
但是将UpdateProgress放入外部,指定AssociatedUpdatePanelID时,却无法看到,正在查询的字样,请指教为什么会这样.谢谢.
HTML code
<div>
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
</div>
<div>
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
<asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Button" />
<asp:UpdateProgress ID="UpdateProgress1" runat="server" AssociatedUpdatePanelID="UpdatePanel1">
<ProgressTemplate>
正在查询,请稍候..
<input id="Button2" onclick="if (Sys.WebForms.PageRequestManager.getInstance().get_isInAsyncPostBack()){ Sys.WebForms.PageRequestManager.getInstance().abortPostBack(); }" type="button" value="取消" />
</ProgressTemplate>
</asp:UpdateProgress>
</div>
<div>
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:GridView ID="GridView1" runat="server" CellPadding="4" ForeColor="#333333">
</asp:GridView>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="Button1" />
</Triggers>
</asp:UpdatePanel>
</div>
|