如何利用asp.net中的ajax进度条应该适用于单页中的所有按钮 [英] How to utilize ajax progress bar in asp.net that should be for all buttons in single page

查看:155
本文介绍了如何利用asp.net中的ajax进度条应该适用于单页中的所有按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在我的aspx页面中维护进度条,但是应该包含更多基于按钮点击和服务器响应的按钮,进度条将显示如何在我的页面中保留它。



i搜索了很多链接,但没人知道。



请帮帮我。

I would like to maintain progress bar in my aspx page but that should contain more buttons based on button clicking and server response the progress bar will be display how can i maintain that in my page.

i searched lot of links but no one is having clear idea.

please help me.

推荐答案

您可以做的一件事是将整个页面放在更新面板中。然后在每个事件上你的进度条都会运行。
one thing you can do is put your whole page inside update panel. then on every event your progress bar will run.


你可以通过在UpdatePanel中使用UpdateProgress来实现它。



样例设计师代码

You can achieve it by using UpdateProgress inside a UpdatePanel.

Sample designer code
<div>
    <asp:ScriptManager ID="ScriptManager1" runat="server" />
    <asp:UpdatePanel ID="UpdatePanel1" UpdateMode="Conditional" runat="server">
    <ContentTemplate>
    <%=DateTime.Now.ToString() %> <br />
    <asp:Button ID="Button1" runat="server" Text="Refresh Panel" OnClick="Button_Click" />
    <asp:UpdateProgress ID="UpdateProgress1" AssociatedUpdatePanelID="UpdatePanel1" runat="server">
    <ProgressTemplate>
      UpdatePanel1 updating...
    </ProgressTemplate>
    </asp:UpdateProgress>
    </ContentTemplate>
    </asp:UpdatePanel>
</div>





参考



以下MSDN链接你会在更新进度中得到更多的想法

MSDN链接 [ ^ ]



谢谢,

-RG



Refer the

below MSDN link you will get more idea in Update progress
MSDN Link[^]

Thanks,
-RG


这篇关于如何利用asp.net中的ajax进度条应该适用于单页中的所有按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆