Solved

UpdateProgress

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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

705 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

13 Experts available now in Live!

Get 1:1 Help Now