Hi,
How do I retrieve the UserName for a logged in user?
Membership.GetUser().UserName doesn't work for me - Object reference not set to an instance of an object.
I need it to get the associated UserID which my own db tables use as primary key
Furthermore, as I am a rookie is the best approach to achieve this through LoggedIn as below?
protected void LoginUser_LoggedIn(object sender, EventArgs e)
{
string UsersName = Membership.GetUser().UserName; //
// find UserId routine goes here....
}
...
Go to the complete details ...