假如(已经用了分页,每页显示10条纪录,但是数据比较复杂,所以每次加载10条还是要很长时间,现在就是要做一个百分比进度条)
GRIDVIEW加载数据(或者点一个按纽后计算什么的)的时候,出现遮罩层,百分比进度条出现,数据开始在数据库中加载,当数据加载完毕,进度条消失,遮罩层消失。
用到的地方主要是:比如GRIDVIEW加载数据,比如点一个按纽后计算什么的。
最好有现成的代码,拿来就可以用,多谢。
用的开发工具是VS2010

解决方案 »

  1.   

    http://www.cnblogs.com/bingdian3721/archive/2008/07/28/1255086.html
    http://blog.csdn.net/reonlyrun/article/details/1464372
    参考。自己在改改。
      

  2.   

    http://www.cnblogs.com/bingdian3721/archive/2008/07/28/1255086.html
    google吧,很多的
      

  3.   

     private void button1_Click(object sender, EventArgs e) { timer1.Start(); } private void timer1_Tick(object sender, EventArgs e) { label2.Width = label2.Width + 1; float a = label2.Width; float b = a / 271*100; string c = Convert.ToString(b).Substring(0,3).TrimEnd('.')+"%"; label3.Text =c; if (label2.Width >= 271) { timer1.Stop(); } }看看可不可以改写,自己用没问题。
      

  4.   


    private void button1_Click(object sender, EventArgs e)
            {
                timer1.Start();
              
            }        private void timer1_Tick(object sender, EventArgs e)
            {
                label2.Width = label2.Width + 1;
                float a = label2.Width;
                float b = a / 271*100;
                string c = Convert.ToString(b).Substring(0,3).TrimEnd('.')+"%";
               
             
                label3.Text =c;
                if (label2.Width >= 271)
                {
                    timer1.Stop();
                }
            }
      

  5.   

    ajax UpdateProgress
    <asp:ScriptManager ID="ScriptManager1" runat="server">
      </asp:ScriptManager>
      <asp:UpdatePanel ID="UpdatePanel1" runat="server">
      <Triggers>
      <asp:AsyncPostBackTrigger ControlID ="Button1" EventName ="Click" />
      </Triggers>
      <ContentTemplate>
      <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
      </ContentTemplate>
      </asp:UpdatePanel>
      <asp:UpdateProgress ID="UpdateProgress1" runat="server">
      <ProgressTemplate>
      <span style =" font-size:12px">更新中......</span>
      </ProgressTemplate>
      </asp:UpdateProgress>
      <asp:Button ID="Button1" runat="server" Text="Button" Width="143px" OnClick="Button1_Click" />
      

  6.   

    错误 70 “System.Web.UI.Timer”不包含“Start”的定义,并且找不到可接受类型为“System.Web.UI.Timer”的第一个参数的扩展方法“Start”(是否缺少 using 指令或程序集引用?) 错误 71 运算符“+”无法应用于“System.Web.UI.WebControls.Unit”和“int”类型的操作数
      

  7.   

    楼主随便挑,http://www.open-open.com/ajax/ProgressBar.htm