0

I have been using The Beer House web example to develope a project and i wan to add photo gallery inside but i m stuck when i can't get the user login identification from the web login which uses the cookies as the user authentication. I want to personalize the photo gallery to each user having their own photo retrieve from database by comparing their user Id.

2
Contributors
2
Replies
3
Views
9 Years
Discussion Span
Last Post by happy8899
0

Sounds like a great idea!

Two thoughts - firstly, is it possible that your cookie is expiring before you can get the data?

Secondly,have you stepped through your code or put in a test variable so thgat you can see if the cookie is getting populated? That's at least one way to at least see that the info you need is in fact getting populated.

Try something likes this:

HttpCookie _cookie = new HttpCookie("MyCookie");

_cookie.Value = _userId.Text; //Whatever captures your user's id for authentication - a textbox, whatever

string _test = _cookie.ToString(); //set a breakpoint here and make sure you have the value.

Hope that helps.

0

Thanks for the clue but what i want to find id the _userId.Text. I can't get the UserId from the Beer house Web example cause i don't have any idea where to get it. Hope you can get the Beer house example and look into it how to get the UserId from the website

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.