⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 webpartmanagerpanel.ascx.cs

📁 asp.net 2.0 WebPart应用. 使用Web部件创建模块化的Web门户应用; 个人化特性和自定义特性; 将自定义用户控件作为Web部件使用; 创建一个个人化特性的提供程序;
💻 CS
字号:
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 WebPartManagerPanel : System.Web.UI.UserControl
{
	protected void Page_Load(object sender, EventArgs e)
	{
		// Based on WebPartManager's capabilities, show / hide options for 
		// switching display modes of the page.
		//
		_browseViewLabel.Visible =
			WebPartManager1.SupportedDisplayModes.Contains(WebPartManager.BrowseDisplayMode);
		_catalogViewLabel.Visible =
			WebPartManager1.SupportedDisplayModes.Contains(WebPartManager.CatalogDisplayMode);
		_connectViewLabel.Visible =
			WebPartManager1.SupportedDisplayModes.Contains(WebPartManager.ConnectDisplayMode);
		_designViewLabel.Visible =
			WebPartManager1.SupportedDisplayModes.Contains(WebPartManager.DesignDisplayMode);
		_editViewLabel.Visible =
			WebPartManager1.SupportedDisplayModes.Contains(WebPartManager.EditDisplayMode);
		_personalizationModeToggleLabel.Visible =
			WebPartManager1.Personalization.CanEnterSharedScope;
	}
	protected void cmdBrowseView_Click(object sender, EventArgs e)
	{
		WebPartManager1.DisplayMode = WebPartManager.BrowseDisplayMode;

	}
	protected void cmdDesignView_Click(object sender, EventArgs e)
	{
		WebPartManager1.DisplayMode = WebPartManager.DesignDisplayMode;

	}

	protected void cmdEditView_Click(object sender, EventArgs e)
	{
		WebPartManager1.DisplayMode = WebPartManager.EditDisplayMode;

	}
	protected void cmdConnectView_Click(object sender, EventArgs e)
	{
		WebPartManager1.DisplayMode = WebPartManager.ConnectDisplayMode;

	}

	protected void cmdCatalogView_Click(object sender, EventArgs e)
	{
		WebPartManager1.DisplayMode = WebPartManager.CatalogDisplayMode;

	}

	protected void cmdPersonalizationModeToggle_Click(object sender, EventArgs e)
	{
		WebPartManager1.Personalization.ToggleScope();
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -