Click here to Skip to main content
15,890,506 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
how can we use session management in window based application in .net
Posted

Session are the web way of storing state within your application on your server, in windows forms/wpf applications state is maintained by the individual forms themselves and the application is running as a single instance so it doesn't make sense on the client side.

However if some of your logic is on a server and the client is used for UI then you can create sessions on your server side code.
 
Share this answer
 
Comments
RaviRanjanKr 9-Dec-11 3:32am    
My 5+
Mehdi Gholam 9-Dec-11 4:46am    
Thanks
thatraja 9-Dec-11 4:49am    
5!
Mehdi Gholam 9-Dec-11 5:07am    
Cheers
Sessions don't exist in Winforms. Create your own internal class or static variables. Check this thread.
How do I maintain user login details in a Winforms application?[^]
 
Share this answer
 
Comments
RaviRanjanKr 9-Dec-11 3:32am    
Nice Link, My 5+
Mehdi Gholam 9-Dec-11 4:47am    
5'ed
Its little bit confusing to use Session in Windows because there is no any kind of support for Sessions in Windows. You might have to create a Global Variables in your application that can be accessed through out your Project.
Have a try and revert back with specific question.
 
Share this answer
 
Comments
Mehdi Gholam 9-Dec-11 4:46am    
5'ed
thatraja 9-Dec-11 4:49am    
5!

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