Click here to Skip to main content
12,894,700 members (60,891 online)
Click here to Skip to main content
Add your own
alternative version


5 bookmarked
Posted 8 May 2014

Progress Bar

, 8 May 2014 CPOL
Rate this:
Please Sign up or sign in to vote.
Regarding progress bar


This tip tells you about progress bar at the time of post back so that the user can't perform the action during critical action performed like credit card payment, saving the data to database, etc. Here, I have code for that.

<asp:UpdateProgress DisplayAfter="1" 

ID="upProgress" DynamicLayout="true" runat="Server"

        AssociatedUpdatePanelID="upPay" >
            <img id="Img1" src="~/images/ajax-loader.gif" 

            runat="server" visible="true" alt="jrc" /><br />
            <div style="width:40%;">
                <asp:Label ID="lblwarningmsg"  ForeColor="Red" 

                text="Please wait while the transaction is processed and do not click the 
                "back button" or refresh  or close the browser window." runat="server">


Also add this script for display progress bar center of the page:

<script language="JavaScript" type="text/javascript">
       function adjustDivs() {
           var df = document.getElementById('<%=upProgress.ClientID %>');
  = 'absolute';
  = (document.documentElement.scrollLeft + 45) + '%';
  = (document.documentElement.scrollTop + 300) + 'px';
       window.onload = adjustDivs;
       window.onresize = adjustDivs;
       window.onscroll = adjustDivs;


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

kunal r somani
Software Developer
India India
No Biography provided

You may also be interested in...

Comments and Discussions

Questionok Pin
BillW338-May-14 3:14
professionalBillW338-May-14 3:14 
GeneralMy vote of 5 Pin
Humayun Kabir Mamun8-May-14 0:58
memberHumayun Kabir Mamun8-May-14 0:58 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.170424.1 | Last Updated 8 May 2014
Article Copyright 2014 by kunal r somani
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid