Click here to Skip to main content
15,891,248 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

my login process done in an api controller i want to use the logged in userid and username in another controller. how can it possible. please help me
Posted

Yes, when the user logged in, you can store the UserID and other details in session and use them where ever it is required.
 
Share this answer
 
Comments
Kunjammu 9-Apr-14 5:33am    
Error shows The name 'Session' does not exist in the current context

i am using apicontroller. in that i can't use session, viewbag and viewdata
i used formauthentication.setauthcookies
 
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