Click here to Skip to main content
15,885,767 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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
PHP
<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>


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

1 solution

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!
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900