Reputation: 609
I want to show loading picture when I'll click the button. And after finish my some calculation, make this picture is invisible. How to do it without AJAX and not using [WebMethod]? I know some tricks how to do it with AJAX or PageLoad, but I'm interesting, how to do it in the different threads, is it possible?
For example my code:
protected void btnDelete_Click(object sender, EventArgs e)
{
imgLoading.Visible = true;
lblCount.Visible = false;
//doing some work
bool isDone = TProfile.Delete(userId, someData);
if (isDone)
{
imgLoading.Visible = false;
lblCount.Visible = true;
}
BindList(true);
}
Upvotes: 1
Views: 2808
Reputation: 3057
You can use the OnClientClick to load an image, and by the time the page will finish the cycle to your server and the page will be reloaded it will disappear.
Upvotes: 3