如何动态修改引用的母版页 如何动态修改引用的母版页比如说 一个文件中if(true){用 1.master}else{用 2.master }这样可以吗? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 page_load里面this.MasterPageFile=""; //调用到page_load事件时,前台已经加载完母版了,还怎么动态? protected void Page_PreInit(Object sender, EventArgs e) { try { if(true) { this.MasterPageFile = "~/pageMaster1.master"; } else { this.MasterPageFile = "~/pageMaster2.master"; } } catch (Exception p) { this.MasterPageFile = "~/pageMaster1.master"; } } protected void Page_PreInit(object sender, EventArgs e) { this.MasterPageFile = "~/MasterPage/MasterPage2.master "; } asp.net多文件上传中 怎么从HttpFileCollection集合中分离出 具有相同key的文件 Vss的使用 DIV显示问题 url Repeater1中的DataTable 判断值重复 asp.net的高手进来啊。(急急急急!!!!!!) 急死人!VS2005那个初学者网站项目按照向导添加用户怎摸老注册不成功啊?? 大侠救命:字符转换问题,急用!在线等待…… 如何做到网页无刷新??? 时间格式化的简单问题 大家在使用数据访问层时,使用sqlHelper,企业库,NHibernate,还是什么,你们使用那个多点,大项目又用那个 关于vs2008操作问题?高分
//调用到page_load事件时,前台已经加载完母版了,还怎么动态?
protected void Page_PreInit(Object sender, EventArgs e)
{
try
{
if(true)
{
this.MasterPageFile = "~/pageMaster1.master";
}
else
{
this.MasterPageFile = "~/pageMaster2.master";
} }
catch (Exception p)
{
this.MasterPageFile = "~/pageMaster1.master";
}
}
{
this.MasterPageFile = "~/MasterPage/MasterPage2.master ";
}