Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Web;
- using System.Web.Security;
- using System.Web.UI;
- using System.Web.UI.WebControls;
- namespace WebApplication1
- {
- public partial class _Default : System.Web.UI.Page
- {
- protected void Page_Load(object sender, EventArgs e)
- {
- if (User.Identity.IsAuthenticated)
- {
- Response.Write("您現在是已登入狀態。");
- }
- }
- protected void btnLogout_Click(object sender, EventArgs e)
- {
- FormsAuthentication.SignOut();
- Response.Redirect(FormsAuthentication.LoginUrl);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement