Hello,

I have been pulling my hair out on different places, trawling the web trying to find the answer to a fairly simple question.
I am using the default membership to store my user details.

I am trying to retrieve a customerid from a Userdata table in my database so that i can store in session and then call on this for all other pages.
So a user logs in then the app goes and retrives his customerid (which is stored in userdata) and then stores this value in session.

the user is tied to the Customerid with a userid which gets entered into userdata at usercreation.

I have asked all over the web and cant find anyone that is willing to help, so any help is gratefully received.

>Need Help with storing CustomerId into session

Session is a dictionary (Key-Value pair) page property.

To store "value" at "userid" (key),

Session["userid"]="value";

To remove a key,

Session.Remove("userid");
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.