工艺栏问题 [英] problem with Process bar

查看:69
本文介绍了工艺栏问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,
我在tabpanel中有两个文本框和两个calenderextender控件和一个提交按钮.
每当我选择两个日期并按提交按钮时,它将在选项卡面板中生成一个购物车.因此,在生成条形图之前,我正在使用过程栏.现在,我想在每次生成条形图之前单击提交"按钮并显示过程栏时都将其隐藏.如何隐藏表格或表格数据.我正在使用一些代码,但无法正常工作.进程栏在这里和那里显示,并且表格没有隐藏.

Hello,
I have two textboxes and two calenderextender controls and one submit buttons in tabpanel.
Whenever I select two dates and press submit button it will generate a bar cart in the tabpanel. So I am using a processbar before generating barchart. Now I want to hide the page whenever I click the submit button and show the processbar before generating the bar charts. How can I hide the table or table data. I am using some code but it is not working properly. The processbar is showing here and there and the table is not hiding.

<td id="Td1" runat="server" align="center" valign="middle" >
<asp:Panel ID="PanelProcessBar" runat="server" >
  <asp:UpdateProgress ID="UpdateProgress2" runat="server" AssociatedUpdatePanelID="UpdatePanel1" DisplayAfter="2000" DynamicLayout ="true">
    <ProgressTemplate>
      <asp:Image ID="ImgProcessBar" runat="server" ImageUrl="~/images/ajax-loader.gif" />
    </ProgressTemplate>
  </asp:UpdateProgress>
</asp:Panel>





protected void BtnShow_Click(object sender, EventArgs e)
{
  System.Threading.Thread.Sleep(2000);
  if (IsPostBack)
  {
    TdTabContainer.Visible = false;
  }
  Get_BarChart();
}



如果有人知道解决方案,请帮助我.
谢谢!



If anybody knows a solution, please help me.
Thank you!

推荐答案

未显示更新栏的原因是DisplayAfter 设置为2000(这意味着不会显示更新)除非有2秒的延迟),但您的睡眠也是如此,就像更新栏即将显示一样,您的页面也会回复.
将sleep设置为3000或将DisplayAfter设置为1000,您应该看到控件一秒钟(给定或花费几毫秒的时间:-))
The reason the update bar isn''t being shown is the DisplayAfter is set to 2000 (meaning the update won''t be shown unless there is a delay of 2 seconds), but so is your sleep so just as the update bar is about to show, your page replies.
Either set the sleep to 3000 or set DisplayAfter to 1000 and you should see the control for one second (give or take a few milliseconds :-))


看看这篇文章:具有Designer支持的Web应用程序的可自定义加载"控件 [
Have a look at this article: Customizable ''Loading'' Control for Web Applications with Designer Support[^]

You can use this control to get the desired behavior.


这篇关于工艺栏问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆