.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal

Home >> Code Snippets >> Javascript >> Post New Resource Bookmark and Share   

 Subscribe to Code Snippets

Progress Bar or HourGlass in asp.net

Posted By:Pankaj Mishra       Posted Date: August 07, 2008    Points: 40    Category: Javascript    URL: http://www.dotnetspark.com  

Code to show Progress Bar or HourGlass in asp.net while page is loading

Some time we need to show the progress bar in our Asp.Net web application. You can add the text also like Please Wait!!! with animated gif which will give user a message to wait until the task is completed. Below is the solution for that.

Add this line of code in the client side

function HideDiv(objDiv) {
    if (document.getElementById(objDiv) != null) {
        document.getElementById(objDiv).style.visibility = "hidden";

and in the page_load event of add this line of code
in C# code sample

Response.Buffer = true;"  

Response.Write("File has been uploaded .Data from the File is being stored in to the database ...!Please Wait "); 


in VB.NET code example

Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)    

Response.Buffer = True        

Response.Write("  File has been uploaded .Data from the File is being stored in to the database ...!Please Wait ")                


End Sub 


All you need one gif/jpg file which show clock or something.


Further Readings:


No response found. Be the first to respond this post

Post Comment

You must Sign In To post reply
Find More code samples in C#, ASP.Net, Vb.Net and more Here

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend