>>Hi Viv,
>>
>>That worked but as you but it does hit the database again. I guess I could store the value in a session variable so the hit would only happen after the log in. I need this value so I can provide the data that only user owns.
>>
>>The next question is how to cast the string back to a guid or should I just store the guid directly to the session variable if I can?
>>
>>Update: I should have tried google first.
>>
>>Guid guUserid = new Guid(curuserid);
>
>Session variables are stored as objects so why not just store it as a Guid:
Session["UserId"]=GetTheUsersGuid();
>//then to retrieve:
>Guid UserId = (Guid)Session["UserId"];
but see my suggestion in your other post re: using a custom object....
>
I was wondering about that so I will give it a try.
Thanks.