Last post Oct 04, 2019 01:46 AM by Fei Han - MSFT
Oct 03, 2019 08:56 PM|rkrex|LINK
I am using the membership authentication. I was wondering what all is involved in getting a session variable as per the line of code below. For some reason I can't access the value that should be in the Session variable EmployeeID. Thanks !
boxEmployeeID.Text = Session("EmployeeID")
Oct 04, 2019 01:46 AM|Fei Han - MSFT|LINK
You can refer to the following code snippet to get the current user first
var current_User = System.Web.Security.Membership.GetUser(User.Identity.Name);
Then you can get ProviderUserKey etc information for the user based on current_User.