Public Class Cookies Inherits System.Web.UI.Page #Region " Web Form Designer Generated Code " 'This call is required by the Web Form Designer. Private Sub InitializeComponent() End Sub Protected WithEvents Message As System.Web.UI.WebControls.Label Protected WithEvents lblName As System.Web.UI.WebControls.Label Protected WithEvents lblEmail As System.Web.UI.WebControls.Label Protected WithEvents lblSignIn As System.Web.UI.WebControls.Label Protected WithEvents txtEmail As System.Web.UI.WebControls.TextBox Protected WithEvents txtName As System.Web.UI.WebControls.TextBox Protected WithEvents SignOut As System.Web.UI.HtmlControls.HtmlInputButton Protected WithEvents SignIn As System.Web.UI.HtmlControls.HtmlInputButton Protected WithEvents ShowCookie As System.Web.UI.HtmlControls.HtmlInputButton 'NOTE: The following placeholder declaration is required by the Web Form Designer. 'Do not delete or move it. Private designerPlaceholderDeclaration As System.Object Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init 'CODEGEN: This method call is required by the Web Form Designer 'Do not modify it using the code editor. InitializeComponent() End Sub #End Region Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 'Put user code to initialize the page here End Sub Private Sub SignIn_ServerClick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SignIn.ServerClick End Sub Public Function DisplayCookie() End Function Private Sub ShowCookie_ServerClick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ShowCookie.ServerClick If Not Request.Cookies("gc") Is Nothing Then DisplayCookie() Else Message.Text = "There are no cookies." End If End Sub Private Sub SignOut_ServerClick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SignOut.ServerClick Response.Cookies("gc").Expires = _ Date.Now.Today.AddDays(-1) txtName.Text = "" txtEmail.Text = "" Message.Text = "Your cookie was deleted." End Sub End Class