Click here to Skip to main content
15,894,460 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
how can we use user.identity.name to have a name of a current login user in the logged in page instead of using loginname control in asp.net
Posted

You can use sessions and save the user information in sessions when the user logs in and retrieve it whenever you need it and make the set the value to null when the use log out.
 
Share this answer
 
Comments
codegeekalpha 13-Aug-11 14:51pm    
but in sessions i can't make form authentication... i have administrators and users.. having different pages
you can use a session variable to store the type of administrators and check that session variable when those pages are used.

the variable can store either admin or user so that it'll be easier to check.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900