S
Saber
I want to prevent users from voting more than 1 time in a simple poll.
I tried:
Session.Timeout = 40
Dim objCookie As HttpCookie
objCookie = New HttpCookie("before", "voted")
If Session("before") = "" And Request.Cookies("before") Is Nothing Then
Session("before") = "voted: true"
Response.Cookies.Add(objCookie)
....
But the If block runs again when I close and open page, then re-submit the
form, I mean Request.Cookies("before") Is Nothing always is Nothing!
why? what I've to do?
I tried:
Session.Timeout = 40
Dim objCookie As HttpCookie
objCookie = New HttpCookie("before", "voted")
If Session("before") = "" And Request.Cookies("before") Is Nothing Then
Session("before") = "voted: true"
Response.Cookies.Add(objCookie)
....
But the If block runs again when I close and open page, then re-submit the
form, I mean Request.Cookies("before") Is Nothing always is Nothing!
why? what I've to do?