tags:

views:

465

answers:

2

Dear All, I want to know how can I implement the scenario "if the user is already logged in or not?" i.e. I have an application which initially redirects u to Login.aspx and then redirect to Home.aspx.There I am showing one msg like Welcome "UserName".Now if the user dont logged out and close the browser and next time visit the site he should directly be redirected to Home.aspx.How to implement this.And is this possible to check in VS2008(that closing of browser and again running the application)?Let me know if u guys want more information.

More Information as asked by Eoin:

The login mechanism is pretty straight FWD. I have one page which registers the user (the values are going to DB.)I have used simple txt box,no login control. The login page matches the values fron DB and let the user logged in.After login the users are redirected to Home.aspx using (FormsAuthentication.RedirectFromLoginPage(TextBox1.Text, false)) and I am able to get the user name using User.Identity.Name. Let me know for more info.

A: 

Are you using the .NET Membership Provider ?

By the sounds of it, you want to implement a "Remember this user" function. You could do this by implementing a cookie based login that stores a login token in the Clients browser so wehn they return to the site, they're automatically re-logged in.

But you really need to provide more info about how your login mechanism is implemented so far.

Eoin Campbell
Thanks Eoin for ur help.I have edited the post .
Wondering
A: 

Do you know how to log out of AIM from your cell phone, LG Xenon? if you do not log out, does it keep u signed in?

Melissa