catalogmode_declarative.aspx.cs
来自「《圣殿祭司的ASP.NET 2.0开发详解——使用C#》光盘内容.包含了书籍所含」· CS 代码 · 共 37 行
CS
37 行
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
public partial class CatalogMode_Declarative : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!User.Identity.IsAuthenticated)
{
FormsAuthentication.RedirectToLoginPage();
}
}
//目录模式
protected void btnCatalogMode_Click(object sender, EventArgs e)
{
if (WebPartManager1.DisplayMode == WebPartManager.BrowseDisplayMode)
{
WebPartManager1.DisplayMode = WebPartManager.CatalogDisplayMode;
btnCatalogMode.Text = "结束目录模式";
}
else
{
WebPartManager1.DisplayMode = WebPartManager.BrowseDisplayMode;
btnCatalogMode.Text = "进入目录模式";
}
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?