title: How to find table cell in asp.net using c#
body: <p>I want to hide an itemtemplate's data in listview using the td visibility property. Once I click a button it should show the data again that's within the itemtemplate. However, I cannot find the td control using c# in the code behind. Is there a way to find this control or another way to handle this?</p>
  
  <pre><code> &lt;asp:Content runat="server" ID="BodyContent" ContentPlaceHolderID="MainContent"&gt;
    &lt;asp:Button ID="Button1" runat="server" Text="Search" OnClick="ButtonClick" /&gt;
   &lt;asp:MultiView ID="MultiView1" runat="server" ActiveViewIndex="0"&gt;
  
       &lt;asp:View ID="View1" runat="server"&gt;
          &lt;asp:ListView ID="SectionListView" runat="server" InsertItemPosition="FirstItem" OnPagePropertiesChanged="SectionListView_PagePropertiesChanged"&gt;
  
               &lt;ItemTemplate&gt;
                   &lt;tr style=""&gt;
                          &lt;td&gt;&lt;/td&gt;
                          &lt;td id="row1" style="visibility:hidden;" runat="server"&gt;
                                  &lt;asp:Label ID="SectionItemLabel" runat="server" Text='&lt;%# Eval("SectionItem") %&gt;' /&gt;
                          &lt;/td&gt;
                   &lt;/tr&gt;
               &lt;/ItemTemplate&gt;
  </code></pre>
  
  <p>Here is part of the code for the button click:</p>
  
  <pre><code>protected void ButtonClick(object sender, EventArgs e)
      {
          var temp = (System.Web.UI.HtmlControls.HtmlTableCell)Page.Master.FindControl("MainContent").FindControl("row1");
      }
  </code></pre>