title: find id of tr in datalist
body: <p>I had table indatalist and I had to find id of tr in table I did my code but error apeared (object refrence...).</p>
  
  <p>aspx:</p>
  
  <pre><code>&lt;asp:DataList ID="DataList2" runat="server" RepeatColumns="4" 
      RepeatDirection="Horizontal" onitemdatabound="DataList2_ItemDataBound"&gt;
      &lt;ItemTemplate&gt;
  
                      &lt;table width="90%" border="0" cellspacing="0" cellpadding="2"&gt;
                          &lt;tr id="AllText" runat="server"&gt;
                              &lt;td class="media_ved_tit_aro" id="AllArrow" runat="server"&gt;
                                  &amp;nbsp;
                              &lt;/td&gt;
                              &lt;td class="media_txt_b " &gt;
                              &lt;asp:Label ID="Label4" runat="server" Text='&lt;%#Eval(Globals.Translate("YoutubeTitle_EN", Page))%&gt;' /&gt;
                              &lt;/td&gt;
                          &lt;/tr&gt;
                      &lt;/table&gt;
                  &lt;/td&gt;
              &lt;/tr&gt;
          &lt;/table&gt;
      &lt;/ItemTemplate&gt;
  &lt;/asp:DataList&gt;
  </code></pre>
  
  <p>cs:</p>
  
  <pre><code>protected void DataList2_ItemDataBound(object sender, DataListItemEventArgs e)
  {
      string LanguageID = Globals.GetSuitableLanguage(Page);
         if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
         {
             ArrowAll  = e.Item.FindControl("AllArrow") as HtmlGenericControl;
             TextAll = e.Item.FindControl("AllText") as HtmlGenericControl;
         }
         if (LanguageID == "ar")
         {
  
             ArrowAll.Attributes.Add("Class", "media_ved_tit_aro_AR");
             TextAll.Attributes.Add("Class", "News_Image");
         }
  }
  </code></pre>