Logged in username

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
 
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?

Context.Current.User.Identity.Name
 
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?

Context.Current.User.Identity.Name
 
G

Guest

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top