网上有好几种解释,但我觉得都是元数据的解释。有人说应该理解成“从--元数据”来。
这里有一个例子。
这个有[从元数据]的标志,上面还带了一个锁一样的图标using ASP;
using System;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;namespace MB.TheBeerHouse.UI
{
public class TemplateMaster : MasterPage
{
protected AppearanceEditorPart AppearanceEditorPart1;
protected BehaviorEditorPart BehaviorEditorPart1;
protected CatalogZone CatalogZone1;
protected WebPartZone CenterZoneBottom;
protected WebPartZone CenterZoneBottomLeft;
protected WebPartZone CenterZoneBottomRight;
protected WebPartZone CenterZoneTop;
protected WebPartZone CenterZoneTopLeft;
protected WebPartZone CenterZoneTopRight;
protected DeclarativeCatalogPart DeclarativeCatalogPart1;
protected EditorZone EditorZone1;
protected LayoutEditorPart LayoutEditorPart1;
protected ContentPlaceHolder LeftContent;
protected WebPartZone LeftZoneBottom;
protected WebPartZone LeftZoneTop;
protected Localize locTemplateMonster1;
protected Localize locTemplateMonster2;
protected LoginView LoginView1;
protected HtmlForm Main;
protected ContentPlaceHolder MainContent;
protected Menu mnuFooter;
protected Menu mnuHeader;
protected ASP.controls_newsletterbox_ascx NewsletterBox1;
protected PageCatalogPart PageCatalogPart1;
protected ASP.controls_personalizationmanager_ascx PersonalizationManager1;
protected ASP.controls_pollbox_ascx PollBox1;
protected ASP.controls_pollbox_ascx pollCurrent;
protected PropertyGridEditorPart PropertyGridEditorPart1;
protected ContentPlaceHolder RightContent;
protected WebPartZone RightZoneBottom;
protected WebPartZone RightZoneTop;
protected ASP.controls_shoppingcartbox_ascx ShoppingcartBox1;
protected SiteMapDataSource SiteMapDataSource1;
protected SiteMapPath SiteMapPath1;
protected Image TemplateMonsterBanner;
protected ASP.controls_themeselector_ascx ThemeSelector1; public TemplateMaster(); protected global_asax ApplicationInstance { get; }
public bool EnablePersonalization { get; set; } protected ProfileCommon Profile { get; } protected void Page_Load(object sender, EventArgs e);
}
}
这个是普通的文件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;namespace MB.TheBeerHouse.UI
{
public partial class TemplateMaster : System.Web.UI.MasterPage
{
private bool _enablePersonalization = false;
public bool EnablePersonalization {
get { return _enablePersonalization; }
set
{
_enablePersonalization = value;
PersonalizationManager1.Visible = (this.Page.User.Identity.IsAuthenticated && value);
}
} protected void Page_Load(object sender, EventArgs e)
{
if (!this.Page.User.Identity.IsAuthenticated)
PersonalizationManager1.Visible = false;
}
}
}
这里有一个例子。
这个有[从元数据]的标志,上面还带了一个锁一样的图标using ASP;
using System;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;namespace MB.TheBeerHouse.UI
{
public class TemplateMaster : MasterPage
{
protected AppearanceEditorPart AppearanceEditorPart1;
protected BehaviorEditorPart BehaviorEditorPart1;
protected CatalogZone CatalogZone1;
protected WebPartZone CenterZoneBottom;
protected WebPartZone CenterZoneBottomLeft;
protected WebPartZone CenterZoneBottomRight;
protected WebPartZone CenterZoneTop;
protected WebPartZone CenterZoneTopLeft;
protected WebPartZone CenterZoneTopRight;
protected DeclarativeCatalogPart DeclarativeCatalogPart1;
protected EditorZone EditorZone1;
protected LayoutEditorPart LayoutEditorPart1;
protected ContentPlaceHolder LeftContent;
protected WebPartZone LeftZoneBottom;
protected WebPartZone LeftZoneTop;
protected Localize locTemplateMonster1;
protected Localize locTemplateMonster2;
protected LoginView LoginView1;
protected HtmlForm Main;
protected ContentPlaceHolder MainContent;
protected Menu mnuFooter;
protected Menu mnuHeader;
protected ASP.controls_newsletterbox_ascx NewsletterBox1;
protected PageCatalogPart PageCatalogPart1;
protected ASP.controls_personalizationmanager_ascx PersonalizationManager1;
protected ASP.controls_pollbox_ascx PollBox1;
protected ASP.controls_pollbox_ascx pollCurrent;
protected PropertyGridEditorPart PropertyGridEditorPart1;
protected ContentPlaceHolder RightContent;
protected WebPartZone RightZoneBottom;
protected WebPartZone RightZoneTop;
protected ASP.controls_shoppingcartbox_ascx ShoppingcartBox1;
protected SiteMapDataSource SiteMapDataSource1;
protected SiteMapPath SiteMapPath1;
protected Image TemplateMonsterBanner;
protected ASP.controls_themeselector_ascx ThemeSelector1; public TemplateMaster(); protected global_asax ApplicationInstance { get; }
public bool EnablePersonalization { get; set; } protected ProfileCommon Profile { get; } protected void Page_Load(object sender, EventArgs e);
}
}
这个是普通的文件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;namespace MB.TheBeerHouse.UI
{
public partial class TemplateMaster : System.Web.UI.MasterPage
{
private bool _enablePersonalization = false;
public bool EnablePersonalization {
get { return _enablePersonalization; }
set
{
_enablePersonalization = value;
PersonalizationManager1.Visible = (this.Page.User.Identity.IsAuthenticated && value);
}
} protected void Page_Load(object sender, EventArgs e)
{
if (!this.Page.User.Identity.IsAuthenticated)
PersonalizationManager1.Visible = false;
}
}
}
解决方案 »
- 谁能提供比较通用的,asp.net开发的,解决方案的树结构样板?
- 很怪的问题???
- document.ready问题
- 我在web程序里,保护Excel单元格,但是出错!谁知道?
- 我将表中ID绑定到DataList中的一label,设id为mid,为什么((Label)e.Item.FindControl("mid")).Text得不到其值呢
- 关于在asp.net中实现msgbox的问题?50分高峰求教
- 怎样使Datalist控件有数据的时候显示数据,没有数据的时候不显示
- Delete方法是大DataRow对象的一个成员,而Remove方法是Row集合的一个成员。
- 删除事件---DataGrid?
- 怎样在datagrid中添加一列,列的内容是自动生成的编号1,2,3。。。
- 有人用过.NET Framework 3.0的System.Speech在XP上声音识别吗?
- 当使用ScriptManager,UpdatePanel时 点击速度快一点就会出现脚本错误,怎样才能防止这种错误出现?
using System;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;namespace MB.TheBeerHouse.UI
{
public class TemplateMaster : MasterPage
{
protected AppearanceEditorPart AppearanceEditorPart1;
protected BehaviorEditorPart BehaviorEditorPart1;
protected CatalogZone CatalogZone1;
protected WebPartZone CenterZoneBottom;
protected WebPartZone CenterZoneBottomLeft;
protected WebPartZone CenterZoneBottomRight;
protected WebPartZone CenterZoneTop;
protected WebPartZone CenterZoneTopLeft;
protected WebPartZone CenterZoneTopRight;
protected DeclarativeCatalogPart DeclarativeCatalogPart1;
protected EditorZone EditorZone1;
protected LayoutEditorPart LayoutEditorPart1;
protected ContentPlaceHolder LeftContent;
protected WebPartZone LeftZoneBottom;
protected WebPartZone LeftZoneTop;
protected Localize locTemplateMonster1;
protected Localize locTemplateMonster2;
protected LoginView LoginView1;
protected HtmlForm Main;
protected ContentPlaceHolder MainContent;
protected Menu mnuFooter;
protected Menu mnuHeader;
protected ASP.controls_newsletterbox_ascx NewsletterBox1;
protected PageCatalogPart PageCatalogPart1;
protected ASP.controls_personalizationmanager_ascx PersonalizationManager1;
protected ASP.controls_pollbox_ascx PollBox1;
protected ASP.controls_pollbox_ascx pollCurrent;
protected PropertyGridEditorPart PropertyGridEditorPart1;
protected ContentPlaceHolder RightContent;
protected WebPartZone RightZoneBottom;
protected WebPartZone RightZoneTop;
protected ASP.controls_shoppingcartbox_ascx ShoppingcartBox1;
protected SiteMapDataSource SiteMapDataSource1;
protected SiteMapPath SiteMapPath1;
protected Image TemplateMonsterBanner;
protected ASP.controls_themeselector_ascx ThemeSelector1; public TemplateMaster(); protected global_asax ApplicationInstance { get; }
public bool EnablePersonalization { get; set; } //就是它,很简单的一句,注意对应下面的看
protected ProfileCommon Profile { get; } protected void Page_Load(object sender, EventArgs e);
}
}
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;namespace MB.TheBeerHouse.UI
{
public partial class TemplateMaster : System.Web.UI.MasterPage
{
private bool _enablePersonalization = false;
public bool EnablePersonalization //就是这个属性了,下面写得很全
{
get { return _enablePersonalization; }
set
{
_enablePersonalization = value;
PersonalizationManager1.Visible = (this.Page.User.Identity.IsAuthenticated && value);
}
} protected void Page_Load(object sender, EventArgs e)
{
if (!this.Page.User.Identity.IsAuthenticated)
PersonalizationManager1.Visible = false;
}
}
}