title: Changing the cssclass for a <tr> using vb.net
body: <p>I have this  and I want to hide rows dynamically using vb.net codebehind.
  I am using VS2010.</p>
  
  <p>This is my table:</p>
  
  <pre><code>&lt;table&gt;
      &lt;tr id="FromDateRow"&gt;
          &lt;td&gt;&lt;asp:Label ID="FromDateLabel" runat="server"&gt;From date:&lt;/asp:Label&gt;&lt;/td&gt;
          &lt;td&gt;
              &lt;input type="text" id="txtFromDateF" class="needs-datepicker" /&gt;
              &lt;asp:TextBox id="txtFromDate" CssClass="hidden" runat="server" /&gt;
          &lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr id="ToDateRow"&gt;
          &lt;td&gt;&lt;asp:Label ID="ToDateLabel" runat="server"&gt;To date:&lt;/asp:Label&gt;&lt;/td&gt;
          &lt;td&gt;
              &lt;input type="text" id="txtToDateF" class="needs-datepicker" /&gt;
              &lt;asp:TextBox id="txtToDate" CssClass="hidden" runat="server" /&gt;
          &lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;&lt;asp:Label ID="CustomerCodeLabel" runat="server"&gt;Customer Code&lt;/asp:Label&gt;:&lt;/td&gt;
          &lt;td&gt;&lt;asp:DropDownList ID="CustomerCodeDropDownList" runat="server" AutoPostBack="False" /&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;&lt;asp:Label ID="CINumberLabel" runat="server"&gt;CI Number&lt;/asp:Label&gt;:&lt;/td&gt;
          &lt;td&gt;&lt;asp:TextBox ID="CINumberTextBox" runat="server" /&gt;&lt;/td&gt;
      &lt;/tr&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p>Now I want to do something like this:</p>
  
  <pre><code>Select Case value
              Case DisplayDates.FromDate
                  ToDateRow.CssClass = "hidden"
                  FromDateRow.CssClass = ""
              Case DisplayDates.ToAndFromDate
                  ToDateRow.CssClass = ""
                  FromDateRow.CssClass = ""
              Case Else
                  ToDateRow.CssClass = "hidden"
                  FromDateRow.CssClass = "hidden"
          End Select
  </code></pre>
  
  <p>For some reason I cannot access the ToDateRow and the FromDateRow from my codebehind.</p>