title: How to check HTML control attributes in Datalist?
body: <p>I did my code to find <strong>HTML</strong> control " <strong>Source</strong>" and I want to check if "<strong>Src</strong>" attribute have value or not , I tried to add " inner text" but
  it return <strong><em>NULL</em></strong> .</p>
  
  <pre><code>&lt;asp:DataList ID="DL_Media" runat="server"  onitemdatabound="DL_Media_ItemDataBound"&gt;
      &lt;ItemTemplate&gt;
          &lt;video width="215" height="160" runat="server"  id="vd" controls&gt;
          &lt;source src='&lt;%# Eval("Media_File")%&gt;' type="video/ogg" 
              runat="server" id="source"&gt;&lt;/source&gt;
          &lt;/video&gt;
      &lt;/ItemTemplate&gt;
  &lt;/asp:DataList&gt;
  
  
  protected void DL_Media_ItemDataBound(object sender, DataListItemEventArgs e)
  {
      if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
      {
          HtmlGenericControl video = e.Item.FindControl("vd") as HtmlGenericControl;
          HtmlGenericControl source = e.Item.FindControl("source") as HtmlGenericControl;
          if (source != null)
          {
              string x = "~/";
              string y = "";
              if (source.InnerText == x)
              {
                  video.InnerText.Replace(x, y);
  
                  DL_Media.DataBind();
  
  
              }
          }
      }
  </code></pre>