By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,825 Members | 1,708 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,825 IT Pros & Developers. It's quick & easy.

who is logged in?

P: n/a
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
Dec 26 '06 #1
Share this Question
Share on Google+
4 Replies


P: n/a
What authentication are you using?

--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
"Guy Cohen" <no*****@please.comwrote in message
news:OX**************@TK2MSFTNGP02.phx.gbl...
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


Dec 26 '06 #2

P: n/a
OHM
Response.Write(System.Security.Principal.WindowsId entity.GetCurrent.Name)

--

Best Regards - OHM

http://TrainingOn.net
--------------------------------------------------
"Eliyahu Goldin" <RE**************************@mMvVpPsS.orgwrote in
message news:%2****************@TK2MSFTNGP04.phx.gbl...
What authentication are you using?

--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
"Guy Cohen" <no*****@please.comwrote in message
news:OX**************@TK2MSFTNGP02.phx.gbl...
>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



Dec 26 '06 #3

P: n/a
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" <RE**************************@mMvVpPsS.orgwrote in
message news:%2****************@TK2MSFTNGP04.phx.gbl...
What authentication are you using?

--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
"Guy Cohen" <no*****@please.comwrote in message
news:OX**************@TK2MSFTNGP02.phx.gbl...
>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



Dec 26 '06 #4

P: n/a
Guy Cohen wrote:
I forgot to mention - I am using the login control of course.....
But the info is needed in a page without the login control.
Page.User.Identity.Name

--

Riki
Dec 26 '06 #5

This discussion thread is closed

Replies have been disabled for this discussion.