Sponsored By
DataConverter
Advertise with Us
Advertisement
Advertise with Us
Follow Us
Follow _MindStick_ on Twitter View MindStick Software's LinkedIn profile View MindStick Software's Facebook profile
Mindstick
Article Article  Forum Forum  Blog Blog  Quiz Quiz  Beginner Beginner  Careers Careers  Contact Contact  Login Login  
Home | Product | Services | About Us | Interview | DeveloperSection | Submit an Article | Submit Blog
Report Abuse Form
Reason:    
   

Home >> .Net >> ASP.Net >> How to access session variable in the class?
Author Post

Pooja Malohtra


Total Post: 17
Member Since: 10/14/2010
Points: 95
How to access session variable in the class?
Posted On: 10/15/2010 7:48:00 AM
Hi!
How to access session variable in the class?
Thank you.
 
Author Post

Uttam Misra


Total Post: 113
Member Since: 6/2/2010
Points: 818
Re: How to access session variable in the class?
Posted On: 10/15/2010 8:16:24 AM
String strSessionName="";

strSessionName= Convert.ToString(httpcontext.current.session["SessionName"]);
Modified On: 10/15/2010 8:19:14 AM
Author Post

Uttam Misra


Total Post: 113
Member Since: 6/2/2010
Points: 818
Re: How to access session variable in the class?
Posted On: 10/15/2010 8:17:08 AM
Report Abuse Answer

You can simply use: System.Web.HttpContext.Current.Session 


Author Post

Pooja Malohtra


Total Post: 17
Member Since: 10/14/2010
Points: 95
Re: How to access session variable in the class?
Posted On: 10/15/2010 8:23:02 AM

Report Abuse Form
Reason:    
 
Total Online Users: 4848
Advertisement
MindStick DataConverter
Advertise with Us
  
Copyright © 2013MindStick. All Rights Reserved.