1.

How to get number of hits to website in vb.net

Answer»

Below code is done in Global.asax and done by application and session variable:-
Sub Application_Start(BYVAL sender As Object, ByVal e As EventArgs)
'below varible count Hits done by VISITORS
Application("count") = 0
END Sub

Sub Session_Start(ByVal sender As Object, ByVal e As EventArgs)
'here we will lock the Application for concurrency ISSUES
Application.Lock()
'below code is for increment the COUNTER
Application("count") = Application("count") + 1
'Now we unlock the Application
Application.UnLock()
End Sub



Discussion

No Comment Found