Store/retrieve object in session

//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
}

source

Comments are closed.