Solved

UpdateProgress

Posted on 2011-03-10
4
656 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: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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Change Format on Data when exporting to Excel 4 23
fso.FolderExists("\\server\HiddenFolder$") 4 51
Help with LINQ and XML 10 27
Vb. Net application freezes 9 30
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

920 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now