saquib189 0 Newbie Poster

Hi, i am using GridView to show user Online in my page and i added some stuff with the help of this code in Page_load.

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load 
Dim OnlineUsers As New MembershipUserCollection()

Dim AllUsers As New MembershipUserCollection() 
Dim LastLoginDate As String

AllUsers = Membership.GetAllUsers()

For Each user As MembershipUser In AllUsers 
If user.IsOnline Then

OnlineUsers.Add(user)

LastLoginDate = user.LastLoginDate.ToShortDateString

End If

Next

Dim OnlineUserCount As Integer = OnlineUsers.Count 
lblSessionCount.Text = OnlineUserCount.ToString()

OnlineUserList.DataSource = OnlineUsers

OnlineUserList.DataBind()

End if

End Sub

now, i want to show User Site Location for tracking user. as i can see which logged in user doing what.

thanks

saquib

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.