Click here to Skip to main content
15,891,033 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have a develope website.supose i login in website in one tab, suppose i open new tab my website display my login page not open home page.Now time open multiple tab each time login page display. so how to only one time login .i am new in this platfrom so plz help me to guide .
thanks.
Posted
Comments
Tejas Vaishnav 24-Jan-14 5:31am    
what is your code, you have write to check weather user is logged in or not?

1 solution

You can store the user information in the session[^]
Session is common to the Single Instance of browser tabs.
In the page load you can check the session values with a Flag, if it is not null then you let the user to navigate to the desired page
if the flag is invalid you can push him to the login page.
Hope you understood.
 
Share this answer
 
Comments
Tom Marvolo Riddle 24-Jan-14 5:40am    
precise 5+
Karthik_Mahalingam 24-Jan-14 5:47am    
Thanks Jas24 :)
Codes DeCodes 24-Jan-14 6:08am    
karthik what i wanted to know is what is life time of that session variable... i know that if session timeouts, then value in it disposes.. or is it that if session variable never timeouts????
Tom Marvolo Riddle 24-Jan-14 6:14am    
Default duration:20 minutes.BTW it can be changed manually
Codes DeCodes 24-Jan-14 6:22am    
i had written a code in web.config to increase session time till 9 hours..
<system.web>
<sessionstate timeout="540">

its not working ...any idea..

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900