Dim i As Integer = 0 Dim productcount As Integer = 0
If HttpContext.Current.Request.Cookies("xxx") Is Nothing Then
Dim gingernuts As New HttpCookie("xxx")
gingernuts.Values("productcount") = 0
gingernuts.Expires = DateTime.Now.AddDays(365)
HttpContext.Current.Response.Cookies.Add(gingernuts)
End If
productcount = HttpContext.Current.Request.Cookies("xxx")("productcount")
For i = 0 To productcount
If HttpContext.Current.Request.Cookies("xxx")("product" & i & "") = "" Then
HttpContext.Current.Response.Cookies("xxx")("product" & i & "") = Request.QueryString("id")
Else
HttpContext.Current.Response.Cookies("xxx")("product" & i & "") = HttpContext.Current.Request.Cookies("xxx")("product" & i & "")
End If
Next
If productcount = 5 Then
HttpContext.Current.Response.Cookies("xxx")("productcount") = 5
HttpContext.Current.Response.Cookies("xxx")("product0") = ""
Else
HttpContext.Current.Response.Cookies("xxx")("productcount") = productcount + 1
End If
我在这里找到了这个但是 vb.net.how 在 asp.net 中做什么?