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.

- Div + css layout entry
- CSS entry
- CSS entry [to]
- CSS learning from entry to the master
- DIV CSS layout and preliminary outline entry
- DIV + CSS layout examples entry (directory)
- CSS primary entry: Connection Properties
- Div + CSS layout entry Guide (to)
- 8 days: CSS layout entry
- CSS entry teaching 14 Q & A
- CSS layout entry [css]
- Css choice of the type, the entry of knowledge!
- WEB2.0 standards handbook: CSS seventh day of entry
- Div + CSS layout entry Guide
- DIV CSS layout examples entry (directory)
- CSS primary entry: text attributes
- 7 days: CSS entry
- XML fine entry of the CSS and XSL
- DIV + CSS layout and preliminary outline entry
- DIV + CSS page layout entry




