Results 1 to 2 of 2

Thread: get online user in membership class

  1. #1
    Join Date
    Apr 2006

    Question get online user in membership class

    hi all,
    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.

  2. #2
    Join Date
    Apr 2006

    resolved prble solved to find all online user

    hello friends,
    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)

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center