Click here to Skip to main content
15,901,853 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi,

I am using ajax update progress bar but it not working fine , I am using following code

ASP.NET
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="Server">
<style type="text/css">
    #progressBackgroundFilter_UpdatePanel
{
	position: fixed;
	top: 0px;
	bottom: 0px;
	left: 0px;
	right: 0px;
	overflow: hidden;
	padding: 0;
	margin: 0;
	background-color: #000;
	filter: alpha(opacity=50);
	opacity: 0.5;	
	z-index: 999999998;
}
#processMessage_UpdatePanel
{
	position: fixed;	
	top: expression((document.documentElement.clientHeight - 45)/2 + 'px');
	bottom: expression((document.documentElement.clientHeight - 45)/2 + 'px');
	left: expression((document.documentElement.clientWidth - 200)/2 + 'px');
	right: expression((document.documentElement.clientWidth - 200)/2 + 'px');
	z-index: 999999999;
	background-color: #fff;
	border: solid 1px #105da4;
}
</style>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="Server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">    
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <contenttemplate>
         <div style="padding-removed 450px;">
          <asp:UpdateProgress AssociatedUpdatePanelID="UpdatePanel1" DisplayAfter="0" DynamicLayout="true"
          ID="updprgModels" runat="server">
          <progresstemplate>
            <div id="progressBackgroundFilter_UpdatePanel">
            </div>
            <div id="processMessage_UpdatePanel" align="center">
              <br />
              <img alt="progress" src="../Images/loading.gif" />
              Processing...
              <br /><br />
            </div>
          </progresstemplate>
          </div>
          <div><asp:Button ID="Button1" runat="server" Text="Button" onclick="Button1_Click" />
          </div>
        </contenttemplate>
Posted
Updated 19-Apr-12 18:14pm
v2
Comments
Sandeep Mewara 20-Apr-12 0:11am    
Can you elaborate and be more specific on what was not working and if you got any error?
Prasad_Kulkarni 20-Apr-12 0:23am    
..and where's your question??

1 solution

some of the points to be remembered while using ajax and Update Progress Bar :
Scriptmanager must be the first control. It must appear before all Ajax controls. After you have added the Updateprogress control, add an UpdatePanel in the same section of Ajax in your toolbox.
In your code there are many missing tags (closing tags for scriptmanager,updateprogress)i dont think it works , anyways
refer the following for more;
http://www.dotnetfunda.com/articles/article733-how-to-use-updateprogress-control-aspnet-ajax.aspx[^]

http://www.dreamincode.net/forums/topic/119029-aspnet-ajax-with-continuous-progress-bar/[^]

http://msdn.microsoft.com/en-us/library/bb386421.aspx[^]
 
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