title: Creating an ASP.NET Session Specific Global Variable?
body: <p>Is it possible to create a variable that is global for each session in ASP.NET? Usually I do this with Session:</p>
  
  <pre><code>Session("my_variable") = 10
  </code></pre>
  
  <p>But this necessitates casting it every time I want to use it like so:</p>
  
  <pre><code>Dim my_variable as String = CInt(Session("my_variable"))
  </code></pre>
  
  <p>I see that if I create a Module I can create variables which are public to an entire project for each session...I also see that Global.asax allows for much of the same functionality offered by modules. I'd prefer to avoid writing a module...is there a way to do this in Global.asax or some other best practice method? Or is Session variables the best way?</p>