All articles| All Pictures| All Softwares| All Video| Go home page| Write articles| Upload pictures

Reading number is top 10 articles
加大MYSQL中的最大连接数的两种方法_php资料_编程技术
PHP在网站开发中常用21种功能代码_[PHP教程]
Asp.net动态生成html页面的一种方法_[Asp.Net教程]
ASP.NET应用程序安全性问题_[Asp.Net教程]
Ajax标签导航实例详解-CSS技巧篇_[AJAX教程]
滑动展开/收缩广告代码实例效果_JavaScript技术_编程技术
aspx页面中Request读取字符成乱码或不准_[Asp.Net教程]
仅用xsl和asp实现分页功能_[XML教程]
使用PHP4.2.0及以后版本的注意事项_php资料_编程技术
PHP爱好者来看:几个有用的函数_php资料_编程技术
Reading number is top 10 pictures
2012 national geographic daily picture7
机器人也有性生活吗?
yy365网站上的美女2
可爱的狗熊们
Small s breast enhancement demonstration
Men's and women's orgasms
Ashlynn Brooke show proud chest measurement1
Go to the national museum1
开始让人感动,后来......
美女浴室写真3
Download software ranking
天龙八部十二宫服务端
Unix video tutorial5
天龙八部最新服务端
圣殿祭司的ASP.NET.2.0.开发详解-使用C#
电车之狼R
SQL2000 For 4IN1
Boxer vs Yellow5
Tram sex maniac 2 (H) rar bag5
Love the forty days
双旗镇刀客B
归海一刀 published in(发表于) 2014/3/16 2:52:01 Edit(编辑)
AJAX实例:动态进度条_[AJAX教程]

AJAX实例:动态进度条_[AJAX教程]

AJAX实例:动态进度条_[AJAX教程]























1.建立进度条html页面

progressbar.htm



















































2.建立样式common.css.bi-loading-status {}{
/**//*position: absolute;*/
width: 150px;
padding: 1px;
overflow: hidden;
}
.bi-loading-status .text {}{
white-space: nowrap;
overflow: hidden;
width: 100%;
text-overflow: ellipsis;
padding: 1px;
}
.bi-loading-status .progress-bar {}{
border: 1px solid ThreeDShadow;
background: window;
height: 10px;
width: 100%;
padding: 1px;
overflow: hidden;
}
.bi-loading-status .progress-bar div {}{
background: Highlight;
overflow: hidden;
height: 100%;
filter: Alpha(Opacity=0, FinishOpacity=100, Style=1, StartX=0, StartY=0, FinishX=100, FinishY=0);
}
3.建立测试页面
3.1html代码

progressbar







<%=fixedHeader()%>


3.2cs代码
首先usingusing System.Threading;
using System.IO;
using System.Text;然后添加代码
public class progressbar : System.Web.UI.Page
{
Page_Load#region Page_Load
private void Page_Load(object sender, System.EventArgs e)
{
if(!Page.IsPostBack)
{
string strFileName =Server.MapPath("progressbar.htm" );
StreamReader sr = new StreamReader( strFileName, System.Text.Encoding.Default );
string strHtml = sr.ReadToEnd();
Response.Write( strHtml );
sr.Close();
Response.Flush();
Thread thread = new Thread(new ThreadStart(ThreadProc));
thread.Start();
LoadData();//load数据
thread.Join();
}
}
#endregion




fixedHeader#region fixedHeader
protected string fixedHeader()
{
StringBuilder s=new StringBuilder();
s.Append(@"

");
s.Append(@"

");
s.Append(@"

Header A

");
s.Append(@"

Header B

");
s.Append(@"

Header C

");
s.Append(@"

");
for(int m=0;m<100;m++)
{
s.Append(@"

");
s.Append(@"

A").Append(m).Append("

");
s.Append(@"

B").Append(m).Append("

");
s.Append(@"

C").Append(m).Append("

");
s.Append(@"

");
}
s.Append(@"

");
return s.ToString();
}
#endregion




ThreadProc#region ThreadProc
private void ThreadProc()
{
string strScript = "";
for ( int i = 0; i <= 100; i++ )
{
System.Threading.Thread.Sleep(10);
Response.Write( string.Format( strScript, i));
Response.Flush();
}
}
#endregion




LoadData#region LoadData
private void LoadData()
{
for(int m=0;m<90000;m++)
{
for(int i=0;i<90000;i++)
{




}
}
}
#endregion




Web Form Designer generated code#region Web Form Designer generated code
override protected void OnInit(EventArgs e)
{
//
// CODEGEN: This call is required by the ASP.NET Web Form Designer.
//
InitializeComponent();
base.OnInit(e);
}




/**////


/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
///

private void InitializeComponent()
{
this.Load += new System.EventHandler(this.Page_Load);
}
#endregion
}

来源:http://blog.csdn.net/lynnlin1122









































添加到del.icio.us 添加到新浪ViVi 添加到百度搜藏 添加到POCO网摘 添加到天天网摘365Key 添加到和讯网摘 添加到天极网摘 添加到黑米书签 添加到QQ书签 添加到雅虎收藏 添加到奇客发现 diigo it 添加到饭否 添加到飞豆订阅 添加到抓虾收藏 添加到鲜果订阅 digg it 貼到funP 添加到有道阅读 Live Favorites 添加到Newsvine 打印本页 用Email发送本页 在Facebook上分享


Disclaimer Privacy Policy About us Site Map

If you have any requirements, please contact webmaster。(如果有什么要求,请联系站长)
Copyright ©2011-
uuhomepage.com, Inc. All rights reserved.