How to display progress in the client browser for a long-loaded ASP.NET page?

xiaoxiao2021-03-06  38

For ASP.NET pages for load time, we can display progress bars in the client browser to display the page is being loaded. Below is the specific implementation process:

1. New project, name is WebPortal, select Visual C # items or Visual Basic projects in the project type;

2. Select the ASP.NET web application in the template type;

3. Enter: http: // localhost / webportal;

4. Add new item: The name is a web form of showprogress.

5. Add any other web server controls on your Web Forms ShowProgress.aspx.

6. Click Right-click on ShowProgress.aspx, click "View Code", in the top: Visual C # .NET Code Using System.Threading; Visual Basic .NET Code Imports System.Threading

7. Enter: in the Page_Load event:

Visual C # .NET code

Response.write ("

Response.write ("_");

Response.write ("");

Response.write ("