Solved

UpdateProgress

Posted on 2011-03-10
4
663 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 13

Expert Comment

by:agarwalrahul
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 500 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
PowerShell: Adding ToGB to a script 4 76
Help solve error message when converting date using vb.NET 10 44
CSS styling problem 3 28
Ajax calendar distorted 4 24
ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

710 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