[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 749
  • 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: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

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

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