Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <%@ Import Namespace="System.Web.Security " %>
- <html>
- <head>
- <style type="text/css">
- h3 {
- font-family:Verdana;
- }
- #Msg {
- font-family:Verdana;
- color:red;
- }
- </style>
- </head>
- <script language="C#" runat="server">
- void Page_Load(Object Src, EventArgs E)
- {
- Welcome.Text = "Hello, " + User.Identity.Name;
- }
- void Signout_Click(Object sender, EventArgs E)
- {
- FormsAuthentication.SignOut();
- Response.Redirect("login.aspx");
- }
- </script>
- <body>
- <h3><font face="Verdana">Using Cookie Authentication</font></h3>
- <form runat="server">
- <h3>
- <asp:Label ID="Welcome" runat="server" /></h3>
- <asp:Button Text="Signout" OnClick="Signout_Click" runat="server" />
- </form>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement