Click here to Skip to main content
15,896,455 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi Friends,
I have problem about my asp.net application it allow multiple user with different user id and password on same browser with different tabs on same computer but gmail,yahoo not allow. gmail shows current login user details in all tabs. is there any solution that keep current user login details in browser with diffrent tabs in asp.net.

please give me solution.
Posted

Use Session for this.For further see this
 
Share this answer
 
Hi.. GaneshKale22,

While login in page load check the Session["UserName"] value.. if already logged in the some user in the browser.. then redirect default page...

C#
if (Session["LoginUserName"] != null)
            {

                //redirect to default page.. like Homepage..
            }

C#
else{
                Session.RemoveAll();
                Session.Abandon();
            }
 
Share this answer
 
Thank you Pravuprasad
As per instruction give in "http://blog.startq.com/2013/03/28/prevent-multiple-tabs-on-c-web-applications/" it work for me.

Thank you
 
Share this answer
 
Comments
Pravuprasad 7-Nov-14 4:29am    
welcome :)

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