title: using server variables in a href <%= xx %> with runat=server
body: <p>When I use an anchor tag on an aspx page as below,</p>
  
  <pre><code>&lt;a href="~/pages/page.aspx?id=&lt;%= ServervariableName %&gt;"&gt; test &lt;/a&gt;
  </code></pre>
  
  <p>it will get the variable value correctly assigned to id but it won't route the page correctly as the ~ will not be evaluated without the runat="server" attribute on the 'a' tag. But once I add the runat server attribute, it does not evaluate the servervariable name anymore.. Does anyone know how this works or what I should do to take care of both?</p>