Logged in username

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,

I have a Net 2.0 app that uses Forms authentication.
I use a LoginView that contains a Login control to have the user log in.

How do I get the name of the current logged in user?

I wanted to set this from the LoggedIn event fired from the Login submit
button
but it looks like there are some (cookie?) issues which prevent me
from getting this info. The compiler errors with "not available in current
context".

Anyone have an idea?

thanks,
bruce
 
Hello,

I have a Net 2.0 app that uses Forms authentication.
I use a LoginView that contains a Login control to have the user log in.

How do I get the name of the current logged in user?

Context.Current.User.Identity.Name
 
Hello,

I have a Net 2.0 app that uses Forms authentication.
I use a LoginView that contains a Login control to have the user log in.

How do I get the name of the current logged in user?

Context.Current.User.Identity.Name
 
Alexey -

I encountered 1 small problem - after the user logs out, the
Context.Current.Identity.Name
still has the "old" user cached in memory. Is there a way to reload or
cause a refresh?

Thanks in advance,
bruce
 
Back
Top