易截截图软件、单文件、免安装、纯绿色、仅160KB

ASP.NET实现进度条


建立一个WEB工程,添加新项->HTML页面,命名为ProgressBar.htm,内容如下:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" id="mainWindow">
<head>
<title>无标题页</title>
<script language="javascript">
function SetPorgressBar(pos)
{
//设置进度条居中
var screenHeight = window["mainWindow"].offsetHeight;
var screenWidth = window["mainWindow"].offsetWidth;
ProgressBarSide.style.width = Math.round(screenWidth / 2);
ProgressBarSide.style.left = Math.round(screenWidth / 4);
ProgressBarSide.style.top = Math.round(screenHeight / 2);
ProgressBarSide.style.height = "21px";
ProgressBarSide.style.display = "";
//设置进度条百分比
ProgressBar.style.width = pos + "%";
ProgressText.innerHTML = pos + "%";
}
//完成后隐藏进度条
function SetCompleted()
{
ProgressBarSide.style.display = "none";
}
</script>
</head>
<body>
<div
id="ProgressBarSide"
style="position:absolute;height:21x;width:100px;color:Silver;border-width:1px;border-style:Solid;display:none">
<div id="ProgressBar" style="position:absolute;height:21px;width:0%;background-color:#3366FF"></div>
<div id="ProgressText" style="position:absolute;height:21px;width:100%;text-align:center"></div>
</div>
</body>
</html>
后台代码,Default.aspx.cs:
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Threading;
using System.IO;
public partial class _Default : System.Web.UI.Page
{
private void begi


相关文档:

ASP.NET发送Email精简版

using System.Net;
using System.Net.Mail;
using System.Text;
    #region 发送Email
    public void sendEmail()
    {
        #region 验证email
        SmtpClient smtp = new SmtpCl ......

理解ASP.NET中的三层中的DAL、BLL和USL

一、三层体系架构  1.表示层(USL):主要表示WEB方式,也可以表示成WINFORM方式。如果逻辑层相当强大和完善,无论表现层如何定义和更改,逻辑层都能完善地提供服务。
  2.业务逻辑层(BLL):主要是针对具体的问题的操作,也可以理解成对数据层的操作,对数据业务逻辑处理。如果说数据层是积木,那逻辑层就是对这些积木的 ......

Asp.net 数据采集基类(远程抓取,分解,保存,匹配)


using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using MSXML2;
using System.Text.RegularExpressions; ......

ASP.NET的配置管理 machine.config

   ASP.NET的配置是从machine.config文件开始的,通常情况下这个文件被放在"c:\Windows\Microsoft.NET\Framework\v2.0.50727\Config"目录中,这文件中定义了ASP.NET所支持的配置文件的各个部分,包括ASP.NET工作进程的配置,以及注册一些能够提供诸如属性配置(profiles)、成员资格(membership)、基于角色的安 ......

asp.net中几种常见的错误处理方法

<一>页面级的错误处理
void Page_Error(Object sender, EventArgs e) {
     String message = "<font face=verdana color=red>"
                         ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号