Click here to Skip to main content
15,901,122 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
Dear developers,

As per requirements I have to create a form where form many times posted back to server,
e.g. on checked_changes,selection_changed etc. but I have to show progress bar only when a specific button is clicked. I have to 3 buttons in form. How could I achieve this?

Thanks in advance..
Posted
Comments
Sergey Alexandrovich Kryukov 15-Mar-15 10:37am    
Not clear. All actions are triggered by something. How having a button or 3 buttons can make any difference? If you want to trigger something with on button, how having two more ones could be relevant? I feel your major problem is logical reasoning, not just lack of some knowledge.
—SA
Priyanka Tiwari001 15-Mar-15 11:06am    
I mean there 3 buttons, viz. Save, Update, Delete in form and some other controls also which causes post back to server but I have to show progress bar on click of save button only. If save button is clicked progress bar should be shown but on click of any other button or any other post backs progress bar shouldn't be shown.

1 solution

Try this...
on that particular button click
at first call this
ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alert", "showdiv();", true);

and at last after all execution call this again
ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alert", "hidediv();", true);

on showdiv
$('#your-div').show();

and on hidediv
$('#your-div').hide();

and put a loading gif within your-div..
 
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