如果有源代码,希望能发给我
[email protected]

解决方案 »

  1.   

    http://dotnet.aspx.cc/ShowDetail.aspx?id=794566B9-5EA2-4782-2D42-E133F3C7BA74
      

  2.   

    客户端javascript是单线程,在显示进度条的时候也没做其它什么事情.我想应该是在客户端写一个程序来更新progressbar,其取值由服户端开个线程来提供.
      

  3.   

    to  noeye(我会用心)
      能具体点吗,最好能给我代码看看
      

  4.   

    也许能行,要自己做一个web进度条控件,有点麻烦呀。
      

  5.   

    我在项目中遇到了同样的情况,也是花了很多时间来找WEB中的进度条.最后采取了以下的方式:先把目标URL传参给loading.aspx页面,让它加载,界面中会显示一个进度条,但不是到了最大值就结束,是一张GIF动画.当在loading.aspx中完全打开目标URL的内容时,该loading.aspx页面消失,目标URL页面显示.loading.aspxhtml:
    <%@ Page language="c#" Codebehind="loading.aspx.cs" AutoEventWireup="false" Inherits="MyWebMoney.loading" EnableViewStateMac="false" %>
    <HTML>
    <HEAD>
    <script language="javascript">
    function fun(){
    if (document.proccess.hid.value !=undefined  ){
    if (document.proccess.hid.value !="") {
    document.location.href =  document.proccess.hid.value
    }
    }
    }
    </script>
    </HEAD>
    <body onLoad="fun()" bgcolor="#fffef9">
    <div style='MARGIN-TOP:40px;MARGIN-LEFT:40px;MARGIN-RIGHT:0px'>
    <p>
    </p>
    <p align="center">
    </p>
    <p align="center">
    </p>
    <p align="center">
    </p>
    <div style='MARGIN-TOP:-20px;MARGIN-LEFT:0px;MARGIN-RIGHT:0px' align="center" id="loading">
    <form method="post" name="proccess">
    <input id="hid" type="hidden" runat="server" NAME="hid">
    <script language="javascript"> 
    document.write("<br><br><br><br><table border=0 cellspacing=1 cellpadding=0  bgcolor=#000000 ><tr bgcolor=#ffffff><td  style='font:9pt Verdana;'>")
    document.write("<img src='./IMAGES/loadbar1.gif'border=0>") 
    document.write("</td></tr></table><br>")
    document.write("<div align=center style='font-size:9pt;color:#000000;'>页面加载中,请稍待.....</div>")
    </script>
    </form>
    </div>
    </div>
    <div align="center"><FONT face="宋体"></FONT>
    <script> 
    <!-- 
    if ((document.proccess.hid.value !=undefined  ) &&  (document.proccess.hid.value !="")) {
    if (document.layers)  
    document.write('<Layer src="' +  document.proccess.hid.value + ' " visibility="hide"> </Layer>')  
    else if (document.all || document.getElementById)  
    document.write('<iframe src="' +  document.proccess.hid.value + '" style="visibility: hidden;"></iframe>')  
    else
    alert("页面加载完毕!")
    location.href =  document.proccess.hid.value 

    //--> 
    </script>
    </div>
    </body>
    </HTML>loading.aspx.cs:
    using System;
    using System.Collections;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Web;
    using System.Web.SessionState;
    using System.Web.UI;
    using System.Web.UI.WebControls;
    using System.Web.UI.HtmlControls;namespace MyWebMoney
    {
    /// <summary>
    /// loading 的摘要说明。
    /// </summary>
    public class loading : System.Web.UI.Page
    {
    protected System.Web.UI.HtmlControls.HtmlInputHidden hid;

    private void Page_Load(object sender, System.EventArgs e)
    {
    // 在此处放置用户代码以初始化页面
    if (!this.IsPostBack) 
    {
    if (this.Request.QueryString["url"] !=null ) 
    {
    hid.Value = this.Request.QueryString["url"].ToString();   
    }
    }
    } #region Web 窗体设计器生成的代码
    override protected void OnInit(EventArgs e)
    {
    //
    // CODEGEN: 该调用是 ASP.NET Web 窗体设计器所必需的。
    //
    InitializeComponent();
    base.OnInit(e);
    }

    /// <summary>
    /// 设计器支持所需的方法 - 不要使用代码编辑器修改
    /// 此方法的内容。
    /// </summary>
    private void InitializeComponent()
    {    
    this.Load += new System.EventHandler(this.Page_Load); }
    #endregion
    }
    }如目标url为: index.aspx
    则链接可写作: http://localhost/loading.aspx?url=index.aspx
      

  6.   

    好!高手!学习,谢谢!不过有一点不明白:Loading的HTML中为什么那几个界面元素(如等待的GIF图和“页面加载中,请稍待....”的字样以及它们的外框)为什么要用Script脚本来写?我试过了直接也可以的啊。我对脚本不熟,不知是不是这样有其他的好处?