📄 logout.cs
字号:
namespace ASPNET.StarterKit.Communities {
using System;
using System.Web.UI;
using System.Web.UI.WebControls;
using ASPNET.StarterKit.Communities;
//*********************************************************************
//
// Logout Class
//
// Represents the user logout page which enables users to
// signout from the community.
//
//*********************************************************************
public class Logout : SkinnedCommunityControl {
string _skinFileName = "Users_Logout.ascx";
//*********************************************************************
//
// Logout Constructor
//
// Calls the base SkinnedCommunityControl constructor
// and assigns the default page skin. Also calls Signout
// method to signout the current user.
//
//*********************************************************************
public Logout() : base() {
// Assign a default skin file name
if (SkinFileName == null)
SkinFileName = _skinFileName;
// Logout User
UserUtility.SignOut();
}
//*********************************************************************
//
// SkinType Property
//
// Specifies the skins directory where this page's skin file is located.
//
//*********************************************************************
override protected string SkinType {
get { return "ContentSkins"; }
}
//*********************************************************************
//
// OnLoad Method
//
// We need to redirect back to the same page to clear the authentication ticket.
//
//*********************************************************************
override protected void OnLoad(EventArgs e) {
if (Context.Request.QueryString["logout"] == null)
Context.Response.Redirect("users_logout.aspx?logout=true");
}
//*********************************************************************
//
// InitializeSkin Method
//
// This method is required by the SkinnedCommunityControl class.
// It does nothing here.
//
//*********************************************************************
override protected void InitializeSkin(Control skin) {}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -