Click here to Skip to main content
15,896,063 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am just trying to display a "Loading" progress bar on every postback.

These are the things i have tried so far.
1. Using Update panel to display the progress bar.(This works only with update panel).
2. Displaying a Fake jquery progress bar(This is not specific with the time being consumed with the actual postback caused by any control in my webpage.)

But the below is what i am trying to implement.
C#
protected void Button1_Click(object sender, EventArgs e)
 {
    startProgressBarOnBeginRequest(this.Page,sender)
    //button1_click code execution..
    endProgressBarOnEndRequest(this.Page,sender)
 }

public void startProgressBarOnBeginRequest(Page page,object sender)
 {
    //show loading image here{Image1.Visible=true}=>this wont work
    //??? how
 }
 public void endProgressBarOnEndRequest(Page page, object sender)
 {
    //hide loading image here{Image1.Visible=false}=>this wont work
    //??? how
 }

I want startProgressBarOnBeginRequest() and endProgressBarOnEndRequest() these 2 methods to execute whenever a postback event happens by any control..

is there anything that i need to do in global.asax? {Application_Start and Application_End events}

Thanks in advance.
Posted
Updated 23-Jul-14 6:45am
v4

1 solution

Try the technique explained at Display loading image while PostBack calls in ASP.Net[^].
 
Share this answer
 
Comments
Prathap S V 24-Jul-14 1:38am    
Thanks for the link. It works as per my Need but only for Button_Click Events. But i want to show the same loading image when a postback is caused due to DropDownList Selection Changed or RadioButton1_SelectedIndexChanged. I need something like $('form').live("anyEventCausingPostback", function (){ShowProgress();});
Ok then do the same thing for other events, like...

$('#ddlYourDropDownList').live("change", function (){ShowProgress();});
Prathap S V 24-Jul-14 4:06am    
thanks a ton! this works great! finally got what i wanted to implement...Thanks again
Cool. Welcome... :)
VICK 25-Jul-14 1:08am    
my 5. :)

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