title: How to set .HRef for a Hyperlink which is inside a repeater
body: <p>Inside a <code>Repeater</code> I have an <code>hyperlink</code> in the item template. </p>
  
  <pre><code>&lt;ItemTemplate&gt;
  &lt;li&gt;
  &lt;a runat="server" id="repLink"&gt;
  &lt;asp:Label runat="server" ID="lblSub"&gt;&lt;/asp:Label&gt;    
  &lt;/a&gt;
  &lt;/li&gt;
  &lt;/ItemTemplate&gt;
  </code></pre>
  
  <p>in the code behind, <code>OnItemDataBound</code> I am accessing it with following code:</p>
  
  <pre><code>HyperLink repLink = (HyperLink) e.Item.FindControl("repLink");
  </code></pre>
  
  <p>Now I want to set the <code>href</code> for this hyperlink <code>repLink</code>.
  But I cannot use <strong><code>.HRef</code></strong> ?</p>
  
  <pre><code>repLink.HRef = "https:\\google.com";
  </code></pre>
  
  <p>The above line gives me syntax error: </p>
  
  <blockquote>
    <p>Cannot resolve symbol 'HRef'</p>
  </blockquote>
  
  <p>I even tried with <code>Link</code> but still the same error.</p>
  
  <pre><code>Link repLink = (Link) e.Item.FindControl("repLink");
  </code></pre>