found computer username C#, asp

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Smurfas
    New Member
    • Jul 2008
    • 30

    found computer username C#, asp

    Hi, when I use:
    string name = Page.User.Ident ity.Name;
    or
    string name = Request.LogonUs erIdentity.Name ;

    I found computer name\username (who login)
    for example: Computer2\Jhon

    But, how find only username(login)
    for example: Jhon
  • Curtis Rutland
    Recognized Expert Specialist
    • Apr 2008
    • 3264

    #2
    use the .Split method. Split the string around the backslash, and only use the 2nd part.

    Comment

    • Smurfas
      New Member
      • Jul 2008
      • 30

      #3
      Thanks,
      but don't know function which show only username(login) ?


      Now whit Split function webpage had loaded, crammed.

      Comment

      • Curtis Rutland
        Recognized Expert Specialist
        • Apr 2008
        • 3264

        #4
        Originally posted by Smurfas
        Thanks,
        but don't know function which show only username(login) ?
        There isn't a function that just shows the username. You have to parse it yourself.

        Originally posted by Smurfas
        Now whit Split function webpage had loaded, crammed.
        I must apologize, but I have no idea what you meant here. Please clarify.

        Comment

        Working...