T
tshad
I have a page that I need to tell how many INDEPENDANT hits have occurred.
I have the following code:
Sub Page_Load(sender as Object, e as EventArgs)
if not IsPostBack then
Call InsertAuditRecord()
end if
End Sub
Which just writes out to a table on who hit this page for a particular
record.
This works fine, but if you do a refresh, it gets counted as another hit
since it isn't a postback. Also, the user can go to another page and then
come back to this page and it is another hit.
Is there a clean way to handle this so that only one hit to the page/record
is recorded once for each visitor?
This is for users that haven't logged on yet, so I don't have any logon
credentials yet.
I was thinking of putting a cookie on their machine to track it, but don't
know if that is the best way.
Thanks,
Tom.
I have the following code:
Sub Page_Load(sender as Object, e as EventArgs)
if not IsPostBack then
Call InsertAuditRecord()
end if
End Sub
Which just writes out to a table on who hit this page for a particular
record.
This works fine, but if you do a refresh, it gets counted as another hit
since it isn't a postback. Also, the user can go to another page and then
come back to this page and it is another hit.
Is there a clean way to handle this so that only one hit to the page/record
is recorded once for each visitor?
This is for users that haven't logged on yet, so I don't have any logon
credentials yet.
I was thinking of putting a cookie on their machine to track it, but don't
know if that is the best way.
Thanks,
Tom.