title: Catching a href event in asp.net
body: <p>So currently here is my code (This is A menu bar that's why i cant use asp link buttons) </p>
  
  <pre><code>  &lt;ul&gt;
                      &lt;li&gt;&lt;a href="#"&gt;&lt;span&gt;Reconciliation&lt;/span&gt;&lt;/a&gt;
                          &lt;ul&gt;
                              &lt;li&gt;&lt;a href="#"&gt;&lt;span&gt;Double Entry Per Total Expired&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
                              &lt;li&gt;&lt;a href="#"&gt;&lt;span&gt;Additional Pulled Out Item per Printed SOR&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
                              &lt;li&gt;&lt;a href="#"&gt;&lt;span&gt;Reclassification to proper account&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
                              &lt;li&gt;&lt;a href="#"&gt;&lt;span&gt;Additional ren/red after expiry&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
                          &lt;/ul&gt;
                      &lt;/li&gt;
                      &lt;li&gt;&lt;a href="#"&gt;&lt;span&gt;Reports&lt;/span&gt;&lt;/a&gt;
                       &lt;ul&gt;
                              &lt;li&gt;&lt;a href="ReportPages.aspx"&gt;&lt;span&gt;Report Generation&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
                              &lt;li&gt;&lt;a href="PrendaDEPage.aspx"&gt;&lt;span&gt;Upload Prenda&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
                              &lt;li&gt;&lt;a href="NavFilesPage.aspx"&gt;&lt;span&gt;Navision Uploader&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
                          &lt;/ul&gt;
                      &lt;/li&gt;
  
                      &lt;li&gt;&lt;a href="#" class="last"&gt;&lt;span&gt;Maintenance&lt;/span&gt;&lt;/a&gt;
                          &lt;ul&gt;
                              &lt;li&gt;&lt;a href="UsersMaintenancePage.aspx"&gt;&lt;span&gt;Report Matrix&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
                              &lt;li&gt;&lt;a href="BranchMaintenancePage.aspx"&gt;&lt;span&gt;Branches&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
                              &lt;li&gt;&lt;a href="AuditTrailPage.aspx"&gt;&lt;span&gt;Audit Trail&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
                          &lt;/ul&gt;
                      &lt;/li&gt;
                  &lt;/ul&gt;
  </code></pre>
  
  <p>i want to add a session variable after i click the <code>&lt;a href&gt;</code> tag but i do not know how to catch the event in asp.net code behind i tried making it <code>runat="Server"</code> but i cannot find any onclick event that i can use for it to work..  </p>
  
  <p>Any ideas? </p>
  
  <p>basically the flow i want to achieve is<br>
  <code>Click href -&gt; Create a session Variable Session["A"] -&gt; response.redirect to my page.</code></p>
  
  <p><strong>EDIT</strong>:
  The top part menu with <code>&lt;a href = #&gt;</code> are the ones i need to track and provide a session variable after i click them before i response redirect them into another page. That's why i also used <code>#</code> instead of the name of the page in order to, and hopefully catch the <code>&lt;a href&gt;</code> on click event if there is any. </p>