如何加载updateprogress [英] how to load updateprogress

查看:95
本文介绍了如何加载updateprogress的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好
我试图用ajax运行一个请稍候的菜单,我听说我必须使用updateprogress,但是页面回发时似乎什么都没有发生!
这是我的代码

Hi guys
im trying to run a please wait menu with ajax,i''ve heard i have to use updateprogress but it seems nothing is happening when page is posting back !
here it is my code

<form id="form1" runat="server">
<asp:Button ID="btn1" runat="server" Text="test" OnClick="btn1_Click" />
<asp:ScriptManager ID="ScriptManager1" runat="server" />
    <asp:UpdateProgress ID="upgLoad" DynamicLayout="true" runat="server">
    
    <ProgressTemplate>
    
        <div id="theprogress">
           <img src="ajax-loader.gif" />
            <span>Loading</span>
        </div>
    </ProgressTemplate>
</asp:UpdateProgress>
</form>



考虑当按下btn1时,我想显示图像!该怎么办?



Consider that when btn1 is pressed i want to show the image!how can i do it?

推荐答案

应该将UpdateProgress控件与.在您的代码示例中,我没有看到UpdatePanel.请查看以下教程:

http://msdn.microsoft.com/en-us/library/bb386421.aspx [ ^ ]

如果您只有1个更新面板,则还可以添加更新进度控件.因此,当在更新面板中进行部分回发时,将在部分更新完成后初始化并禁用更新进度控件.

但是,如果您有多个更新进度控件,则还必须指定AssociatedUpdatePanelID.

本教程将详细讨论所有这些内容.看看吧!
An UpdateProgress control is supposed to be used with an UpdatePanel. In your code sample, I don''t see an UpdatePanel. Check out the following tutorial:

http://msdn.microsoft.com/en-us/library/bb386421.aspx[^]

If you just have 1 update panel, you can also add a update progress control. So when a partial post-back occurs w/in the update panel, the update progress control will be initialized and disabled when the partial update is complete.

But, in case you have multiple update progress controls you also have to specify a AssociatedUpdatePanelID.

The tutorial discusses all of this in detail. Check it out!


这篇关于如何加载updateprogress的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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