/ Published in: C#
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
//On Login page User currentUser = <get the User entity here, including relations to UserRights>; Session.Add("CurrentUser", currentUser); //On another page User restoredUser = Session["CurrentUser"] as User; if (restoredUser != null) { //use the User entity here to check user's rights }