惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Google Online Security Blog
Google Online Security Blog
S
Security @ Cisco Blogs
Recent Commits to openclaw:main
Recent Commits to openclaw:main
人人都是产品经理
人人都是产品经理
The Hacker News
The Hacker News
W
WeLiveSecurity
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
The Cloudflare Blog
博客园 - 司徒正美
雷峰网
雷峰网
L
LINUX DO - 最新话题
博客园 - 叶小钗
云风的 BLOG
云风的 BLOG
The Last Watchdog
The Last Watchdog
V2EX - 技术
V2EX - 技术
S
Security Affairs
有赞技术团队
有赞技术团队
月光博客
月光博客
T
Threatpost
T
Tor Project blog
O
OpenAI News
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
V
V2EX
Know Your Adversary
Know Your Adversary
Project Zero
Project Zero
博客园 - 三生石上(FineUI控件)
D
Docker
AWS News Blog
AWS News Blog
AI
AI
P
Proofpoint News Feed
K
Kaspersky official blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
D
Darknet – Hacking Tools, Hacker News & Cyber Security
www.infosecurity-magazine.com
www.infosecurity-magazine.com
S
Securelist
F
Fortinet All Blogs
F
Full Disclosure
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
量子位
Hacker News - Newest:
Hacker News - Newest: "LLM"
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
P
Palo Alto Networks Blog
Cyberwarzone
Cyberwarzone
Cisco Talos Blog
Cisco Talos Blog
美团技术团队
N
News | PayPal Newsroom
T
The Blog of Author Tim Ferriss
MyScale Blog
MyScale Blog

博客园 - gz.net

gridview绑定问题 - gz.net - 博客园 好久没来了。共享一个自动生成编号的存储过程 jsp数据库大全 login Microsoft Windows SharePoint Services ASP.NET程序中常用代码汇总(一) - gz.net - 博客园 ASP.NET动态生成HTML页面 日语的初次认识 日语的初次认识 检测远程URL是否存在的三种方法 ---转自孟子 Eclipse快速上手指南 自己动手用c#写控件 代价 五种提高 SQL 性能的方法 js教程 HTML教程 HTML教程 存储过程编写经验三 存储过程经验二
对于长时间装载的ASP.NET页面如何在客户端浏览器中显示进度?
gz.net · 2005-12-09 · via 博客园 - gz.net

  对于长时间装载的ASP.NET页面如何在客户端浏览器中显示进度? 
  对于加载时间比较长的ASP.net页面,我们可以在客户端浏览器中显示进度条来显示页面正在装载。下面就是具体的实现过程:
  
  新建项目,名字为WebPortal,在项目类型中选择Visual C#项目或者Visual Basic项目都可;
  在模板类型中选择ASP.NET Web应用程序;
  位置里输入:http://localhost/WebPortal;
  添加新项:名字为ShowProgress的Web窗体。
  在您的Web窗体ShowProgress.aspx上添加任何其他的Web服务器控件。
  在ShowProgress.aspx上单击右键,点“查看代码”,在最上面输入:
  Visual C# .NET代码
  using System.Threading;
  
  Visual Basic .NET代码
  Imports System.Threading
  
  在Page_Load事件里输入: Visual C# .NET代码
  Response.Write("<div id='mydiv' >");
  Response.Write("_");
  Response.Write("</div>");
  Response.Write("<script>mydiv.innerText = '';</script>");
  Response.Write("<script language=<a href="http://dev.21tx.com/web/javascript/" target="_blank">JavaScript</a>>;");
  Response.Write("var dots = 0;var dotmax = 10;function ShowWait()");
  Response.Write("{var output; output = '正在装载页面';dots++;if(dots>=dotmax)dots=1;");
  Response.Write("for(var x = 0;x < dots;x++){output += '·';}mydiv.innerText = output;}");
  Response.Write("function StartShowWait(){mydiv.style.visibility = 'visible'; ");
  Response.Write("window.setInterval('ShowWait()',1000);}");
  Response.Write("function HideWait(){mydiv.style.visibility = 'hidden';");
  Response.Write("window.clearInterval();}");
  Response.Write("StartShowWait();</script>");
  Response.Flush();
  Thread.Sleep(10000);
  
  Visual Basic .NET代码
  Response.Write("<div id='mydiv' >")
  Response.Write("_")
  Response.Write("</div>")
  Response.Write("<script>mydiv.innerText = '';</script>")
  Response.Write("<script language=<a href="http://dev.21tx.com/java/" target="_blank">Java</a>script>;")
  Response.Write("var dots = 0;var dotmax = 10;function ShowWait()")
  Response.Write("{var output; output = '正在装载页面';dots++;if(dots>=dotmax)dots=1;")
  Response.Write("for(var x = 0;x < dots;x++){output += '·';}mydiv.innerText = output;}")
  Response.Write("function StartShowWait(){mydiv.style.visibility = 'visible'; ")
  Response.Write("window.setInterval('ShowWait()',1000);}")
  Response.Write("function HideWait(){mydiv.style.visibility='hidden';")
  Response.Write("window.clearInterval();}")
  Response.Write("StartShowWait();</script>")
  Response.Flush()
  Thread.Sleep(10000)
  
  在ShowProgress.aspx窗体的html的中输入:
  <script>
  HideWait();
  </script>
  
  点在浏览器中查看即可。