How to extract user Id from session

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
frosty
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 32
Joined: Thu Jul 24, 2008 3:22 am

How to extract user Id from session

Post by frosty » Mon Feb 09, 2009 1:59 pm

Hi as a work around to the "Flash Cookie bug" i am passing thru the session in flash var.

My question is , once i have the session, how do i then exract the userId.

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: How to extract user Id from session

Post by mazhar » Tue Feb 10, 2009 6:34 am

In ASP.NET you can save and retrieve values form session in following way

Code: Select all

//Set
Session["id"] = 123;

//Get
int id = AlwaysConvert.ToInt(Session["id"]);

Post Reply