In ASP. net ajax Beta2, The UpdateProgress control has been moved from the "value-added" CTP to the ASP. net ajax core. The UpdateProgress article in this article is basically translated from the official ASP. net ajax website.
I. Simple USE OF THE UpdateProgress Control
1. Create a Web page and switch to the design view.
2. Under the AJAX Extensions tab of the toolbox, double-click the ScriptManager control to add it to the page.
3. Double-click the UpdatePanel control to add it to the page.
4. Double-click the UpdateProgress control to add it to the page.
5. Add the text "Progress…" to the UpdateProgress control ......".
6. Add a Button and a Label to UpdatePanel.
7. Set the Text attribute value of the Label to "Initial Page Rendered ".
8. Double-Click Button to add a Click event.
9. Add the following code to the Click Event Processing of Buttond. Here, a 3-second delay is created manually and the current time is displayed.
- protectedvoidButton1_Click(objectsender,EventArgse)
- {
- //Introducingdelayfordemonstration.
- System.Threading.Thread.Sleep(3000);
- Label1.Text="Pagerefreshedat"+
- DateTime.Now.ToString();
- }
10. Save and press Ctrl + F5 to run.
11. click the Button. The interface is as follows:
The above describes the UpdateProgress control in ASP. net ajax.
- Use Web Parts in ASP. NET 2.0
- JavaScript and ASP. NET controls Integration
- ASP. NET authentication and authorization
- Introduction to ASP. NET 2.0 Virtual Hosts
- Asp. Net dynamic page Conversion