Quantcast
Channel: ASP.NET AJAX + Ajax Control Toolkit (ACT)
Viewing all articles
Browse latest Browse all 5678

Use Update Progress control to show different "status" messages during async postback

$
0
0

Hi and a happy new year 2 all!!!

I want to know if there a way to notify the user during an async postback of different status messages? What I mean by this is:

  1. <div mce_keep="true">User clicks a button within UpdatePanel</div>
  2. <div mce_keep="true">Button_click method executes</div>
  3. <div mce_keep="true">UpdateProgress shown</div>
  4. <div mce_keep="true">various sub-methods within Button_click method execute</div>
  5. <div mce_keep="true">before each sub-method executes, to update the progress label with something more informative</div>

So, in this last step the progress label will move from:

Loading --> Loading Preferences --> Loading Profile --> .... until method complete

I am using the UpdatePanelAnimationExtender which simply shows and hides an ASP:Label (lblProgressUpdate) OnUpdating and OnUpdated respectively - this is the label whose text property I would like to update.

An example I have tried and failed at is:

protected void Button1_Click(object sender, EventArgs e)
{
  doDataOperation1();


  lblProgressUpdate.text = "Loading Preferences...";
  UpdatePanel1.Update();
  doDataOperation2();


  lblProgressUpdate.text = "Loading Profile...";
  UpdatePanel1.Update();
  doDataOperation3();


  Response.Redirect("~/mem/Default.aspx");
}

Is this at all possible?

Cheers!!


Viewing all articles
Browse latest Browse all 5678

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>