[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 752
  • Last Modified:

MembershipUser.IsOnline Property

How can MembershipUser.IsOnline Property be updated realtime? I tested it for displaying online users and keep seeing offline ones still listed. Please advise,
0
ksfok
Asked:
ksfok
1 Solution
 
DarkoLordCommented:
Can you show your code you use to get MembershipUser?
0
 
ksfokAuthor Commented:
   Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

        Label1.Text = "OnLine Count : " & Membership.GetNumberOfUsersOnline().ToString()
        Dim olUsers As New MembershipUserCollection
        Dim UserOLlist As MembershipUserCollection
        UserOLlist = Membership.GetAllUsers()
        For Each user As MembershipUser In UserOLlist
            If user.IsOnline Then
                olUsers.Add(user)
            End If
        Next
        GridView1.DataSource = olUsers
        GridView1.DataBind()

    End Sub
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now