While this is possible in C#: (User is a L2S class in this instance)
User user = // function to get user
Session["User"] = user;
why this is not possible?
User user = // function to get user
HttpCookie cookie = new HttpCookie();
cookie.Value = user;
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.
Btw, if possible, is it secure to store an object within a cookie rather than only the ID ?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…