Write to session on anchor click ASP.NET
<p>I have ASP.NET based site. For example I have two anchors:</p>

<pre><code>&lt;a id="sortByPopular" runat="server" href="url1"&gt;Popular&lt;/a&gt;
&lt;a id="sortByRecent" runat="server" href="url2"&gt;Recent&lt;/a&gt;
</code></pre>

<p>At code behind I can build href attributes:</p>

<pre><code>sortByPopular.Href = BuildURL(POPULAR);
sortByRecent.Href = BuildURL(RECENT);
</code></pre>

<p>And I want to remember, which sort order user is using on listing page. I think there should be the way to create new Session variable when user clicks on link. Could someone help me with this?</p>

<p>Thanks in advance.</p>
