asp.net - How can I store a UserID and Name with the LoginControl? -


i have logincontrol works great, however, want store more information being authenticated or not. store userid of user when make changes can call userid , record made changes.

here code.

 dim db new dataclassesdatacontext          dim user = (from usertable in db.users _                     select usertable _                     usertable.active = true , _                     usertable.name = logincontrol.username , _                     usertable.password = rc.cryptedtext _                     )         if user.count = 1             e.authenticated = true         else             e.authenticated = false         end if 

i want able call userid later, i'm able login , access pages fine,

 session("userid") = logincontrol.username 

would great long session doesnt cleared.

try may you.

http://www.c-sharpcorner.com/uploadfile/syedshakeer/1789/ http://www.15seconds.com/issue/020220.htm http://www.exforsys.com/tutorials/asp.net-2.0/forms-authentication-in-asp.net-2.0.html


Comments

Popular posts from this blog

silverlight - Applying a style to ItemContainerStyle in C# -

php - Retrieving comment count from fb:comments widget (Facebook) -

c# - NullReferenceException in MySqlClient.NativeDriver -