title: get href attrib of anchor element from code behind in asp.net
body: <p>hi my dear friends :<br>
  how can i get href attrib of anchor element from code behind in asp.net? (c#)  </p>
  
  <p>why the below codes do n't work?<br>
  aspx :  </p>
  
  <pre><code>            &lt;a runat="server" id="lightbox" href='&lt;%# GetImageurl() %&gt;'&gt;
              &lt;asp:Image ID="imgInrpvEdit" runat="server" ImageUrl="~/Images/Admin/Unknown.png" /&gt;
              &lt;/a&gt;
  </code></pre>
  
  <p>code behind :  </p>
  
  <pre><code>protected string GetImageurl()
  {
      return "/Images/Admin/Unknown.png";
  }
  </code></pre>
  
  <p>note : my pages base on master &amp; content pages + In those content pages i have multiview &amp; upper Anchor is inside a view in content page... </p>
  
  <p>best regards</p>