Click here to Skip to main content
15,885,365 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:
C#
Membership.GetNumberOfUsersOnline();

but it returns 0 online

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

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.
 
Share this answer
 
v3
I tried the following code:[^]
C#
Membership.GetUser(username, true);

worked successfully to set user as on-line.

thanks to all
 
Share this answer
 
v2

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