|
-
Jul 30th, 2003, 02:36 PM
#1
how would I know if a user is logged on?
I'm usign forms authentication. I have a login page which uses this line to set a cookie and redirect:
FormsAuthentication.RedirectFromLoginPage(username, False)
I have a single page in my project that is public to every user, whether they are logged in or not. I'm wondering how I can determine if the user that's viewing that public page is logged in or not.
rate my posts if they help ya!
Extract thumbnail without reading the whole image file: (C# - VB)
Apply texture to bitmaps: (C# - VB)
Extended console library: (VB)
Save JPEG with a certain quality (image compression): (C# - VB )
VB.NET to C# conversion tips!!
-
Jul 30th, 2003, 11:32 PM
#2
yay gay
sorry if i am saying BS but maybe by reading the cookies? if the cookie is not null then he is logged, otherwise he is not
\m/  \m/
-
Jul 31st, 2003, 12:53 AM
#3
rate my posts if they help ya!
Extract thumbnail without reading the whole image file: (C# - VB)
Apply texture to bitmaps: (C# - VB)
Extended console library: (VB)
Save JPEG with a certain quality (image compression): (C# - VB )
VB.NET to C# conversion tips!!
-
Jul 31st, 2003, 01:59 AM
#4
Frenzied Member
Once the user is authenticated, you can access there user name from Context.User.Identity.Name from any code behind page.
So you can check like this
Code:
if(Context.User.Identity.IsAuthenticated)
{
Response.Write("User logged in");
}
-
Jul 31st, 2003, 03:37 PM
#5
Originally posted by DevGrp
Once the user is authenticated, you can access there user name from Context.User.Identity.Name from any code behind page.
So you can check like this
Code:
if(Context.User.Identity.IsAuthenticated)
{
Response.Write("User logged in");
}
yay it's workin! thanks
rate my posts if they help ya!
Extract thumbnail without reading the whole image file: (C# - VB)
Apply texture to bitmaps: (C# - VB)
Extended console library: (VB)
Save JPEG with a certain quality (image compression): (C# - VB )
VB.NET to C# conversion tips!!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|