tags:

views:

838

answers:

2

How to get userID of current user logged in from server using asp.net vb?

+1  A: 

Are you using ASP.NET Membership Provider? Then it would be Profile.UserId.

Did you create your own membership system?

Are you talking about getting the Windows User? I think you can use:

Request.ServerVariables["LOGON_USER"]
Jack Marchetti
No. am not using ASP.NET Membership provider........i want my loginID from my system..Thanks In advance
Kushal
A: 
    I got the answer.and thanks for helping me...

    Dim strUserId As String
    Dim aryUserId As String()
    strUserId = HttpContext.Current.Request.LogonUserIdentity.Name
    aryUserId = strUserId.Split("\")
    Response.write(aryUserId(1))
Kushal