Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

UpdateProgress

Posted on 2011-03-10
4
Medium Priority
?
669 Views
Last Modified: 2012-05-11
I want to use the UpdateProgress on the screen to show the user that the app is working.  My code so far is listed below but it doesn't  do anything.
<asp:UpdatePanel ID="UdtPnlUpload" runat="server">
		<ContentTemplate>
		<asp:Panel id="pnlUpload" runat="server">		
			<asp:Label ID="Label1" runat="server" Text="Upload your presentation slides."></asp:Label>
			<br />
			<br />
			<asp:FileUpload ID="fuSlides" runat="server" />
			<br />
			<br />
			<asp:Label ID="lblStatus" runat="server" Style="font-family: Arial; font-size: small;"></asp:Label>
			<br />
			<br />
			<asp:Label ID="lblWarning" runat="server" Text="Presentations may take several minutes to upload."></asp:Label>
			<br />
			<br />
			<asp:Label ID="lblUploadfail" runat="server" ForeColor="Red" Visible="false" Text=""></asp:Label>
			<br />
			<br/>
			<asp:Button ID="btnSubmit" runat="server" Text="Submit" />
			<asp:Button ID="btnCancel" runat="server" Text="Cancel" />
		</asp:Panel> 
	   </ContentTemplate>
	</asp:UpdatePanel>

	<asp:UpdateProgress ID="UpdateProgress1" runat="server"  AssociatedUpdatePanelID="UdtPnlUpload" DisplayAfter="1">
		<ProgressTemplate>
			<iframe frameborder="0" src="about:blank" style="border:0px;position:absolute;z-index:9;left:0px;top:0px;width:expression(this.offsetParent.scrollWidth);height:expression(this.offsetParent.scrollHeight);filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=35, FinishOpacity=0, Style=0, StartX=0, FinishX=100, StartY=0, FinishY=100);">
				<div style="position:absolute;z-index:10;left:expression((this.offsetParent.clientWidth/2)-(this.clientWidth/2)+this.offsetParent.scrollLeft);top:expression((this.offsetParent.clientHeight/2)-(this.clientHeight/2)+this.offsetParent.scrollTop);">Processing...<br /><img src="images/ActiveWait.gif" />
				</div>
			</iframe>
		</ProgressTemplate>
	</asp:UpdateProgress>

Open in new window

0
Comment
Question by:triplebd69
  • 2
4 Comments
 
LVL 13

Expert Comment

by:Rahul Agarwal
ID: 35103995
You also need to have the control called <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager> on the to use the ajax functionality on your page.

Please see the link how to do this:

http://ajax.net-tutorials.com/controls/updateprogress-control/
0
 

Author Comment

by:triplebd69
ID: 35108922
Not sure what you mean, I have a script manager, but it is on the masterpage, this is my content page.
0
 
LVL 10

Accepted Solution

by:
Nash2334 earned 2000 total points
ID: 35132084
I've had to initialize these on the client side in the past when they wouldn't work, try the following in the head of your document:

<script language="javascript" type="text/javascript">
    function InitializeRequest(sender, args) {
        if (prm.get_isInAsyncPostBack())
            args.set_cancel(true);
        postBackElement = args.get_postBackElement();

        if (postBackElement != null && postBackElement.id == '<%= MyTriggerButton.ClientID %>')
            $get('<%= UpdateProgress1.ClientID %>').style.display = 'block';
    }

    function EndRequest(sender, args) {
        if (postBackElement != null && postBackElement.id == '<%# MyTriggerButton.ClientID %>')
            $get('<%= UpdateProgress1.ClientID %>').style.display = 'none';
    }
0
 
LVL 10

Expert Comment

by:Nash2334
ID: 35132089
</script> at the end, obviously.
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
In real business world data are crucial and sometimes data are shared among different information systems. Hence, an agreeable file transfer protocol need to be established.
Loops Section Overview
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…
Suggested Courses

782 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question