473,378 Members | 1,400 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Check If Logged In

Hi All,

This must be a simple question, but I just can't figure it out. I want to
know if the user is logged in programmatically. I tried to use the
LoginStatus control, but of course that only has a LoggedOut event, not a
LoggedIn event (why?).

If anybody has a sample, I'd be very grateful.

Thanks,
PAGates
Sep 19 '06 #1
1 1668
How about Request.IsAuthenticated?

http://msdn2.microsoft.com/en-us/lib...enticated.aspx

It looks like that's what the LoginStatus uses to determine what to display.

"The LoginStatus control has two states, logged in to the Web site and
logged out of the Web site, determined by the IsAuthenticated property of
the Page object's Request property."

http://msdn2.microsoft.com/en-us/library/6b40ws69.aspx

Ken
Microsoft MVP [ASP.NET]
"pagates" <pa*****@discussions.microsoft.comwrote in message
news:BB**********************************@microsof t.com...
Hi All,

This must be a simple question, but I just can't figure it out. I want to
know if the user is logged in programmatically. I tried to use the
LoginStatus control, but of course that only has a LoggedOut event, not a
LoggedIn event (why?).

If anybody has a sample, I'd be very grateful.

Thanks,
PAGates

Sep 19 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: fr? | last post by:
Hi, i have a website , on wich users have to log in credentials are checked against mysql db some session vars are set during login for use somewhere else in the code. Is there a way to...
27
by: mrbog | last post by:
Tell me if my assertion is wrong here: The only way to prevent session hijacking is to NEVER store authentication information (such as name/password) in the session. Well, to never authenticate...
4
by: Shamrock | last post by:
Hi, I need to write application which tell me who is login. In example: 1. login as Shamrock 2. I see Shamrock login 3. someone login as Morbious 4. They both see : Shamrock & Morbious 5....
5
by: Mitul | last post by:
Hi to all, I am working on a site in which I need to check whether user is online or not. If user successfully logged out then I can change status from online to offline but if user do not...
3
by: fomalhaut | last post by:
Hi All, I am building a tool for one of our company's service desks, and one of the functions I'm hoping to add is the ability to enter a username and find what PC that user is currently logged...
4
by: Simon Gare | last post by:
Hi all, below is an insert statement on an asp page that stores the date and time that a driver logged on, what I need is to check that they are now already logged on fields are SQL Server...
6
by: saddist | last post by:
Hello, For certain reasons I had to make my own USERS table where I store username, passwd, access_lvl and so on. Now I would like to display certian data from database depending on what...
1
by: SmartPHP | last post by:
Hi friends, My problem is...i want to open an application on click of some link...but before opening that application i want to check if that application is already opened with some other login id...
2
by: ascll | last post by:
Greetings, How to I know existing user already login to my website (using ASP.net 2.0, MS Web Developer's login wizard)? If the user already login, I would like to set the path for...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.