Click here to Skip to main content
15,885,546 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Good day

I am new to ASP.NET\Jquery and reading up on implementing a 'progress image' when getting info from the database in an ASP.net application.

I came across the following article:

http://www.aspsnippets.com/Articles/Show-progress-bar-on-Button-Click-in-ASPNet.aspx[^]

In the btnSubmit_click event I would normally write the following:

C#
protected void btnSubmit_Click(object sender, EventArgs e)

{
    *Display busy mouse cursor
    GetDataFromDatabase();
    *Display normal mouse cursor

}


My question is, in this code from the article, when/where does the 'progress load image' know when the process (getting the data from the database) is finished?
Posted
Updated 11-Nov-15 0:07am
v2

1 solution

In the given article, loader is shown when the form is getting submitted. And when the form submitted the page refreshes, meaning the loader won't be shown then.

But there's another way you can do it without refreshing the page. Use AJAX.
Read this article:
jQuery Display Progress Bar on Button Click in Asp.net[^]


-KR
 
Share this answer
 
Comments
Anil kumar 55 12-Nov-15 8:02am    
YES your link answer is absolutely right.
see in HTML code he can right <img src="loader.gif" alt="" />
And then he is call it javascript function
var loading = $(".loading");
loading.show(); // call the variable
Krunal Rohit 13-Nov-15 0:58am    
Thanks.

-KR

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