title: How to use session variable in URL through ASPX page
body: <p>I have an aspx page
  There is a hyperlink to another page with some parameters. The parameters to pass is stored in Session variables.</p>
  
  <p>I tried like below</p>
  
  <pre><code>&lt;a href="Home.aspx?C="+&lt;%= Session("id").ToString()%&gt;&gt;Home&lt;/a&gt;
  </code></pre>
  
  <blockquote>
    <p>The name 'Session' does not exist in the current context</p>
  </blockquote>
  
  <p><strong>Edited</strong></p>
  
  <p>I changed  () to []</p>
  
  <p>Home</p>
  
  <p>Now no error but when clicking the link the page is coming but the URL is</p>
  
  <pre><code>Home.aspx?C=
  </code></pre>
  
  <p>The session value is not displaying </p>
  
  <p>I am getting below error. Is it not possible to access the session variable like above in aspx page?</p>