我的页面用了ajax中的updatapanel做局部更新!!
用户查询数据库中的数据时,在处理过程什么提示都没了!!
怎样才能在页面上做一个提示呢?例如在updatapanel中央出现一个提示正在更新的图标!!
谢谢
------解决方案--------------------------------------------------------
你点按钮后,显示“正在更新”,处理页中返回相关状态,处理完成后再显示“更新完成”
------解决方案--------------------------------------------------------
用updateprogress
------解决方案--------------------------------------------------------
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server" />
<div>
<asp:UpdateProgress ID="UpdateProgress1" runat="server">
<ProgressTemplate>
Loading...
</ProgressTemplate>
</asp:UpdateProgress>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
<asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Button" />
</ContentTemplate>
</asp:UpdatePanel>
</div>
</form>
------解决方案--------------------------------------------------------
例子
- C# code
<form id="form1" runat="server"> <asp:ScriptManager ID="ScriptManager1" runat="server" /> <div> <asp:UpdateProgress ID="UpdateProgress1" runat="server"> <ProgressTemplate> Loading... </ProgressTemplate> </asp:UpdateProgress> <asp:UpdatePanel ID="UpdatePanel1" runat="server"> <ContentTemplate> <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label> <asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Button" /> </ContentTemplate> </asp:UpdatePanel> </div></form>