tags:

views:

11

answers:

0

Hi,

say you have a website for a shop where you have to login/register to access the checkout. Do you use FormsAuthentication.SetAuthCookie("user_id", false) for that?

then everytime a user adds an item to the shop it calls a method that adds the item in a database table. the method is going to require the user_id to save this in the table. There will be other methos that require the user_id... Do we then query the FormsAuthentication to get the user_id? Or is it better/safer to store it user_id in a session variable at the beginning and then get it from there?

or is there a better way of doing this that Im missing?

thanks