title: Getting the Session Inside an ASP.Net ScriptMethod
body: <p>I have a list of objects which I store in the session.  This list then appears on a web page with little "X"s next to each item.  When one of them is clicked I use Javascript to remove the item from the list on the page and then I send an AJAX call to the server to remove the item from the list in the session also.  Here's where things get a little tricky.  I'm using a ScriptMethod that looks like this (C#):</p>
  
  <pre><code>[System.Web.Services.WebMethod, System.Web.Script.Services.ScriptMethod]
      public static void removeListItem(string itemNumber)
  </code></pre>
  
  <p>The problem is that this is a <b>static</b> method which means I don't have access to the Page variable which in turn means I don't have access to the Session.  Now the sessionID is sent with the request (which I also can't access) and the server has the session so I would assume that there's some way to take that ID and access the session.  Is there a way to access the session from a static method like this?  Thanks!</p>