Getting the user login name

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

Guest

Hello,

please tell me how i can get the login name of the person who has logged in.

Thanks in advance
Ishan
 
Hi Ishan,

Try:
Environment.UserName

I think this should suffice?

Hope this helps...
Patrick
 
hi
WindowsPrincipal wp = new WindowsPrincipal(WindowsIdentity.GetCurrent());
String username = wp.Identity.Name;

hope this will work for you

regards
Ansil
Trivandrum
 

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

Similar Threads

Excel worksheet 1
Printing from the data grid 1
MAPI in dot net 1
mouse pointer 2
Time zone problem 2
Bookmarks 1
Click on website button with tag "button" 0
schedule tasks list on a win2k machine 1

Back
Top