Click here to Skip to main content
14,880,436 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
When the user uses the option (Remember Me) and close the browser and he opens the site again, he will not appear with online members.

how can i set a user to online after reopen site again?

i use this code:

but it returns 0 online

thank you
Updated 6-Aug-13 8:18am

The option "Remember Me" is oftenly retain the login details in cookies.
Once the user access your website, you can retrieve the login details from cookies.

Some developers store the login details in database.
I tried the following code:[^]
Membership.GetUser(username, true);

worked successfully to set user as on-line.

thanks to all

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