ASP.NET AJAX entry Series (6): UpdateProgress control briefly

Related Tags:

  In ASP.NET AJAX Beta2, UpdateProgress control from the "value-added" in the CTP moved ASP.NET AJAX core.    The following two articles on the UpdateProgress ASP.NET AJAX Basic translation from the official website. 

  Main content 

  1.    UpdateProgress control simple to use 

  2.    Use multiple UpdateProgress control 

  1.    UpdateProgress control simple to use 

  1.    Creating a Web page and switching to the design view. 

  2.    In the toolbox AJAX Extensions tab, double-click ScriptManager control added to the page. 

  3.    Double-click UpdatePanel control add to the page. 

  4.    Double-click UpdateProgress control added to the page. 

  5.    UpdateProgress control in the text added, "Progress……." 

  6.    In UpdatePanel add a Button and a Label. 

  7.    Label set of attribute values for the Text "Initial Page Rendered." 

  8.    Double-click Add Click Button incident. 

  9.    Click in the incident Buttond add the following code, here are the creation of a three-second delay and to Display the current time.    .    Preservation and press Ctrl + F5 operation. 

  Protected void Button1_Click (object sender, EventArgs e) 

  ( 
  / / Introducing delay for demonstration. 

  System.Threading.Thread.Sleep (3000); 

  Label1.Text = "Page refreshed at the" + 

  DateTime.Now.ToString (); 

  ) 

10

  11.    Button click interface as follows: 

  2.    Use multiple UpdateProgress control 

  By default, UpdageProgress controls will be displayed on all pages UpdatePanel control the progress of updating information, in the previous version of the UpdateProgress, we can not only that a particular set UpdateProgress a UpdatePanel updates, the latest version of UpdateProgress control provided AssociatedUpdatePanelID Properties can be designated UpdateProgress control display which UpdatePanel control.    Below this example UpdateProgrss controls will only show it in the UpdatePanel update information. 

  1.    Creating a Web page and switching to the design view. 

  2.    In the toolbox AJAX Extensions tab, double-click ScriptManager control added to the page. 

  3.    Double-click Add two UpdatePanel control UpdatePanel control to two pages. 

  4.    In each UpdatePanel respectively, and add a Label Button. 

  5.    Label each set of two attribute values for the Text "Initial Page Rendered."    (Some of the official website this step) 

  6.    Double-click controls add a Button Click incident. 

  7.    Click in the incident Buttond add the following code, here are the creation of a three-second delay and to display the current time.    .    Switching to the design view. 

  Protected void Button1_Click (object sender, EventArgs e) 
  ( 
  / / Introducing delay for demonstration. 

  System.Threading.Thread.Sleep (3000); 

  Label1.Text = "Page refreshed at the" + 

  DateTime.Now.ToString (); 
  ) 

  Protected void Button2_Click (object sender, EventArgs e) 

  ( 
  / / Introducing delay for demonstration. 

  System.Threading.Thread.Sleep (3000); 

  Label2.Text = "Page refreshed at the" + 

  DateTime.Now.ToString (); 
  ) 

8

  9.    In the first UpdatePanel add UpdateProgrss controls, and add text Panel1 updating… 

  10.    In the second UpdatePanel add UpdateProgress control, Panel2 updating… 

  11.    Preservation and press Ctrl + F5 operation 

  12.    Click a button UpdatePanel Button in progress information only shows in the first UpdatePanel. 

  13.    Click in the second UpdatePanel Button button, the progress of information only shows in the second UpdatePanel. 




Related articles:

FW shape text graphics path: University of the school badge
  In this paper, the main examples of Nankai University and drawing together all the school badge.    Our thinking is the school badge Centre placed on "Nankai" word to represent the school name, word around is a 1.80 image of the star, a star map, cut round, there is a circ...
AS code 2.0: new language elements
  The Flash ActionScript (AS) code control is interactive Flash achieve an important component of the animation software is different from the other specialty skills.    This new release of the Flash MX Professional 2004 ActionScript language has been upgraded to 2.0, which is an obj...
Break fireworks strokes
  Figure overall results are as follows:    Dual consistent style, to cut a long story short, there are questions please Gentie.    (This tutorial only FW8 skilled users)    Dual originally only wanted to damage the feeling, although by the end of the expected e...
Two useful tools GOOGLE
  1, on your web site keywords in the rankings GOOGLE software    Free Monitor for Google    Http://www.cleverstat.com/googlemon.exe    2, a search engine crawls Simulator (Search Engine Spider Simulator)    Http://www.seobox.org/se_spider_simulator.p...
CSS manuals compendium
  Since the W3C (The World Wide Web Consortium) formulation of a code-named Cougar of the 4.0 version of HTML, Web pages exist in the dynamic effects first formal recognition, the W3C dynamic hypertext (Dynamic HTML) the realization of the To three parts: scripts, supports dynamic effects of br...