<%@ Import Namespace="System.Web.Security " %>

<html>

  <script language="VB" runat=server>
    Sub Page_Load(Src As Object, E As EventArgs)
        msg.Text = "欢迎, "  + User.Identity.Name
    End Sub

    Sub Signout_Click(Src As Object, E As EventArgs)
        FormsAuthentication.SignOut()
        Response.Redirect("login.aspx")
    End Sub
  </script>

  <body>
  
    <h3><font face="Verdana">使用 Cookie 验证</font></h3>
    
    <form runat=server>
    
      <h3><asp:label id="msg" runat=server/></h3>
    
      <asp:button text="登出" OnClick="Signout_Click" runat=server/>
    	
    </form>
    
  </body>

</html>

