This is a migrated thread and some comments may be shown as answers.

Page visitors authenticated or not

1 Answer 13 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Guenni
Top achievements
Rank 1
Guenni asked on 01 Oct 2008, 09:18 PM
Hello,

I'm working on a webpage and I'd like to know if the current visitor is anonymous or has  logged in. In need this to enable/disable some controls.

What I'd like to reach is:

if user=anonymous
(not logged in)
{disable member controls}

if user=authenticated

{enable member controls}


Thanks in advance

~Guen~

1 Answer, 1 is accepted

Sort by
0
Todd Anglin
Top achievements
Rank 2
answered on 06 Oct 2008, 06:35 PM
Guen-

Not sure if you've found your answer yet, but ASP.NET provides a very simple framework for performing this exact task. Take a look at these quickstart demos on the LoginView control:


It enables you to display different content based on roles and login/logout status. Hope that helps.

-Todd
Tags
General Discussions
Asked by
Guenni
Top achievements
Rank 1
Answers by
Todd Anglin
Top achievements
Rank 2
Share this question
or