在运行processbar之后隐藏表 [英] hiding a table after running processbar

查看:76
本文介绍了在运行processbar之后隐藏表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,先生.
我正在使用processbar.
我的要求是,当我单击显示"按钮时,页面将被隐藏,并且我想显示进程栏.之后将显示条形图.
但是首先显示过程栏,然后隐藏页面,但不显示条形图.隐藏页面时,进程栏应显示在页面中央.
如果有人知道解决方法,请告诉我.
谢谢.

我的代码如下:

Hello sir.
I am using processbar.
My requiremment is when I click the show button, the page will be hidden and I want to show the processbar. After that a bar chart will be displayed.
But first, the processbar is displaying and then page is hiding, but bar chart is not displaying. When I hide the page, the processbar should be displayed on center of the page.
If any body knows a solution, please tell me.
Thank you.

my code is below:

</table>

         </td>
         <td align="left" valign="top" style="left:0px;">
                      <table id="TableProcessBar" runat="server">
                          <tr>
                              <td id="Td1" runat="server" align="center" valign="middle" >

                                       <asp:UpdateProgress ID="UpdateProgress2" runat="server" AssociatedUpdatePanelID="UpdatePanel1" DisplayAfter="1000" DynamicLayout ="true">
                                             <ProgressTemplate>

                                                    <asp:Image ID="ImgProcessBar" runat="server" ImageUrl="~/images/ajax-loader.gif" />

                                             </ProgressTemplate>
                                       </asp:UpdateProgress>

                              </td>
                          </tr>
                      </table>
                      </td>

     </tr>

   </table>





protected void BtnShow_Click(object sender, EventArgs e)
{
  Page.ClientScript.RegisterStartupScript(this.GetType(), "clientscript", "document.getElementById('TdTab').style.visibility = 'hidden';", true);
  //if (IsPostBack)
  //{
  //    TdTab.Visible = false;
  //}

  Thread.Sleep(5000);
  //TdTab.Visible = true;

  Get_BarChart();
}

推荐答案

只需在TableProcessBar上设置可见属性.
Just set the viisible property on TableProcessBar.


您正在使用''.style .可见性''属性.一旦使用此控件隐藏了控件,它将不再存在于表单上,并且您将很难返回到客户端.而是使用''.style. display ''属性.
You are using ''.style.visibility'' attribute. Once the control is hidden using this, it wont exist on the form anymore and would be difficult for you to get back client side. Instead use ''.style.display'' attribute.


这篇关于在运行processbar之后隐藏表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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