Hello Ray,
The membership class exposes GetUser() not CurrentUser(). You should be able
to use the Membership.GetUser() method to get the current user:
MembershipUser u = Membership.GetUser(HttpContext.Current.User.Identi ty.Name);
if (u != null)
{
// do some work
}
--
brians
http://www.limbertech.com
"Ray Booysen" wrote:
> Hi all
>
> I'm wanting to know if its possible to retrieve the current user when
> using the 2.0 membership provider. The GUID UserID in Users I am using
> as a foreign key in other tables and I need to use it for other database
> operations.
>
> The membership class doesn't expose a CurrentUser() method and has Find
> methods but not something I can use.
>
> Any ideas?
>
> Regards
> Ray
>