日期:2014-05-17 浏览次数:20455 次
Protected Sub Button2_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button2.Click
Dim cook As HttpCookie = New HttpCookie("UserInfo")
cook.Expires = Now.AddDays(2)
cook.Value = "XXX"
HttpContext.Current.Response.Cookies.Add(cook)
'Me.Response.AppendCookie(cook)
End Sub
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim cookRead As HttpCookie = HttpContext.Current.Response.Cookies("UserInfo")
TextBox1.Text = cookRead.Values.Count
End Sub