title: How to store an object in a cookie?
body: <p>While this is possible in C#: (User is a L2S class in this instance)</p>
  
  <pre><code>User user = // function to get user
  Session["User"] = user;
  </code></pre>
  
  <p>why this is not possible?</p>
  
  <pre><code>User user = // function to get user
  HttpCookie cookie = new HttpCookie();
  cookie.Value = user; 
  </code></pre>
  
  <p>and how can it be done? I don't want to store the id of the user within the cookie and then do some validation. </p>
  
  <p>Btw, if possible, is it secure to store an object within a cookie rather than only the ID ? </p>