UpdateProgress control in ASP. NET AJAX

Source: Internet
Author: User

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.

 
 
  1. protectedvoidButton1_Click(objectsender,EventArgse)  
  2. {  
  3. //Introducingdelayfordemonstration.  
  4. System.Threading.Thread.Sleep(3000);  
  5. Label1.Text="Pagerefreshedat"+  
  6. 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.

  1. Use Web Parts in ASP. NET 2.0
  2. JavaScript and ASP. NET controls Integration
  3. ASP. NET authentication and authorization
  4. Introduction to ASP. NET 2.0 Virtual Hosts
  5. Asp. Net dynamic page Conversion

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.