Last post Feb 16, 2009 05:59 AM by hardtoget410
Feb 13, 2009 02: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 06: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 13, 2009 09:00 PM|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 05: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