Last post Feb 16, 2009 09:59 AM by hardtoget410
Feb 13, 2009 06:35 AM|phao|LINK
I'm tring to write my own function based on this kit. My problem is how could I get current login user's id? I can find the username, and searched the web. One way is to use "Membership" which does not work in this case. Any one can help me on this question?
Feb 13, 2009 10:06 AM|ajaykumar.pv|LINK
it may be in the session. Like session["user"] or, if the session["user"] contain the username, then write a query to select the id corresponding to the name in the session["user"]
Hope this will help you!
Feb 14, 2009 01:00 AM|phao|LINK
There is no cookies about the user, so I use the Membership/Guid method. It works. Thank you very much for the help.
Feb 16, 2009 09:59 AM|hardtoget410|LINK
I got this error of casting while trying to get user id
I wrote this line of code
MembershipUser myuser = Membership.GetUser();
then I got this error