how to run if(!User.IsAuthenticated) or access Profile.values in App_Code? c# .NET

Posted by korben on Stack Overflow See other posts from Stack Overflow or by korben
Published on 2010-05-14T21:27:12Z Indexed on 2010/05/14 21:34 UTC
Read the original article Hit count: 172

Filed under:
|
|
|
|

i'm trying to run a conditional statement in a class i'm placing in my App_Code folder

the condition is whether the person is logged in or not. I normally have two ways to do this in my masterpage and ASPX's

if (!User.IsAuthenticated) or if(Profile.username = "anonymous")

however neither of these things seem available to me in the .cs i'm making. anyone know what i'm missing? maybe a using namespace up top?

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about c#