Display progress bars when loading pages for a long time in ASP. NET web applications

Source: Internet
Author: User

Display progress bar in ASP. NET

For ASP. NET pages that have been loaded for a long time, we can display a progress bar in the client browser to show that the page is being loaded. The specific implementation process is as follows:

  1. Create a project named webportal. In the project type, select Visual C # project or visual basic project;
  2. Select an ASP. NET web application from the template typeProgram;
  3. Enter: http: // localhost/webportal;
  4. Add a new project: A web form named showprogress.
  5. Add any other Web server controls on your web form showprogress. aspx.
  6. Right-click showprogress. aspx and click "View ".Code", Enter at the top:
    Visual C #. Net code Using system. Threading; <br/> Visual Basic. Net code Imports system. Threading <br/>
  7. In the page_load event, enter:Visual C #. Net code Response. write (""); <br/> response. write ("_"); <br/> response. write ("<p>"); <br/> response. write (""); <br/> response. write (""); <br/> response. flush (); <br/> thread. sleep (10000); <br/> Visual Basic. Net code Response. write ("") <br/> response. write ("_") <br/> response. write ("<p>") <br/> response. write ("") <br/> response. write ("") <br/> response. flush () <br/> thread. sleep (10000) <br/>
  8. Enter:
  9. Click View in the browser.

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.