if it is an asp:TableRow in asp:Table or a HtmlTableRow, you can set its Visible property to false in C#, otherwise you have to use javascript on the client side to do itSomeTableID.rows[n].style.display="none";

解决方案 »

  1.   

    可以使用
    <div id="show" runat="server" visible="false">   //不显示
    你的<tr>内容
    </div>在.cs文件里申明show为HtmlControls.HtmlGenericControl
    在你的操作里可以控制show的显示于否
    visible=true   //显示
      

  2.   

    漏写了.
    show.visible=true   //显示
    show.visilbe=false  //不显示
      

  3.   

    <div>里可以嵌套<tr>吗?报错了啊
      

  4.   

    而且好像说是<div>不能嵌套在<table>中
      

  5.   

    那就只好用
    <asp:table>
    <asp:tablerow>
    <asp:tablecell>
    来解决问题了.
    faint
    这样很麻烦.样式用起来也不方便.