How to use Session in different Namespace? [Resolved]

Posted by Sathya4260 under C# on 2/8/2011 | Points: 10 | Views : 1812 | Status : [Member] | Replies : 5
Hi,

Can anyone advice me whether it is possible to use session in different Namespace in C#, If Yes, kindly let the steps to fallow and achieve this..

Kindly let me know ASAP...

Sathish Kumar S


Responses

Posted by: Sathya4260 on: 2/9/2011 [Member] Starter | Points: 25

Up
0
Down

Resolved
Thanks for the reply,

I got the answer, Session can be accessed through out the application, even by different name space just by using

Session["Username"].ToString()

Sathish Kumar S

Sathya4260, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Naimishforu on: 2/8/2011 [Member] [MVP] Bronze | Points: 25

Up
0
Down
Hi, I'm confused. Session in different Namespace?? Can you please be more specific or anyone else can please describe me what he wants to convey??

Thanks

Thanks,
Naimish
http://dotnetinterview.zxq.net/
http://naimishpandya.blogspot.in/

Sathya4260, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sathya4260 on: 2/8/2011 [Member] Starter | Points: 25

Up
0
Down
If I have namespace A,B and when i store session value from an class in Namespace A,

From any class NameSpace B, I want to get the value of that session...

Sathish Kumar S

Sathya4260, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Karthikanbarasan on: 2/8/2011 [Member] [Moderator] [Microsoft_MVP] [MVP] Silver | Points: 25

Up
0
Down
Hi,

You can make session availalbe in global.asax or make it available in the master page to access it across namespaces.

Thanks
Karthik
www.f5Debug.net

Sathya4260, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Naimishforu on: 2/8/2011 [Member] [MVP] Bronze | Points: 25

Up
0
Down
Hi, I think you can just provide the absolute path and achieve the same!!!!

Thanks,
Naimish
http://dotnetinterview.zxq.net/
http://naimishpandya.blogspot.in/

Sathya4260, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response