who is logged in?

  • Thread starter Thread starter Guy Cohen
  • Start date Start date
G

Guy Cohen

Hi all
I would like to know who is logged in so the code will run differently
e.g.
if username="user1" then
end if

how can I tell who is logged in?

TIA
Guy
 
Response.Write(System.Security.Principal.WindowsIdentity.GetCurrent.Name)

--

Best Regards - OHM

http://TrainingOn.net
--------------------------------------------------


Eliyahu Goldin said:
What authentication are you using?

--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin


Guy Cohen said:
Hi all
I would like to know who is logged in so the code will run differently
e.g.
if username="user1" then
end if

how can I tell who is logged in?

TIA
Guy
 
I forgot to mention - I am using the login control of course.....
But the info is needed in a page without the login control.

Guy


Eliyahu Goldin said:
What authentication are you using?

--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin


Guy Cohen said:
Hi all
I would like to know who is logged in so the code will run differently
e.g.
if username="user1" then
end if

how can I tell who is logged in?

TIA
Guy
 
Back
Top