get online user in membership class
i am using membership class in my website.
i want to generate a list of all online user of the site.
there are some methods like getAllUsers() and getNumberOfOnlineUsers(),
but there is not any function like "GetAllOnlineUser()"
how can i done this type of thing...
please help me.
prble solved to find all online user
i have solved my problem to find all online user.
As i already told to you that i'm using getAllUsers() method which returns a collection of all user.
there is a property "isOnLine" by which we can check that a user is online or not...
now, if we pass this collection to in a foreach loop and with in loop we check that members are online or not, we can find all online users...
An example of code is as followes...........
MembershipUserCollection allUsers = Membership.GetAllUsers(this.PageIndex, this.PageSize, out totalRecords);
MembershipUserCollection filteredUsers = new MembershipUserCollection();
bool isOnline = true;
foreach (MembershipUser user in allUsers)
// if user is currently online, add to gridview list
if (user.IsOnline == isOnline)
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)