using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
public partial class Default : BasePage
{
protected override void InitializePage()
{
//设置不同的MasterPageFile实现换肤
this.MasterPageFile = "~/skins/default/Default.master";
}
protected void Page_Load(object sender, EventArgs e)
{
//获取masterpage中的ContentPlaceHolder
ContentPlaceHolder ContentPlaceHolder1 = Master.FindControl("ContentPlaceHolder1") as ContentPlaceHolder;
//添加控件到ContentPlaceHolder
LiteralControl lit = new LiteralControl();
lit.Text = "test";
ContentPlaceHolder1.Controls.Add(lit);
}
}