N
Nightcrawler
I am currently using the built in membership functionality with
asp.net 2.0. I currently have set the web.config to only store
registered users in the database. I don't want to polute the
aspnet_Users with anonymous users.
When a user gets to one of my aspx pages I would like to find out if
the user is logged in. I am currently doing it this way:
MembershipUser membershipUser = Membership.GetUser();
if (membershipUser != null)
{
... some code
}
else
{
... some code
}
Is there a better way? I feel that everytime I do this it will have to
pull the user from the database. It sounds like an expensive way to
see if the user is logged in or not.
Please let me know.
Thanks
asp.net 2.0. I currently have set the web.config to only store
registered users in the database. I don't want to polute the
aspnet_Users with anonymous users.
When a user gets to one of my aspx pages I would like to find out if
the user is logged in. I am currently doing it this way:
MembershipUser membershipUser = Membership.GetUser();
if (membershipUser != null)
{
... some code
}
else
{
... some code
}
Is there a better way? I feel that everytime I do this it will have to
pull the user from the database. It sounds like an expensive way to
see if the user is logged in or not.
Please let me know.
Thanks