How to get UserId of a logined user from ASPNETDB.MDF?

How to get UserId of a logined user from ASPNETDB.MDF

I have create some users through Web Site Administration Tool in ASP.NET 2.0.
After a user logined, I hope to add some records to a table which include UserID field for the logined user,
but I don't know how to get UserId of logined user, and how to insert the uniqueidentifier field UserID to a table




Answer this question

How to get UserId of a logined user from ASPNETDB.MDF?

  • wbartussek

    For ASP.NET related questions its best to ask in the forums of the site [ www.asp.net ].

    Generally you can get the users ID by qurying the User object

    Context.Current.User.Identity.Name ;


    Regards,
    Saurabh Nandu
    www.MasterCSharp.com



  • How to get UserId of a logined user from ASPNETDB.MDF?