我的一个项目有一个要求,我需要在运行时更改母版页。
我的意思是我需要应用检查,并且在该检查的基础上可以将特定母版页调用到我的 native aspx 页面。
请帮助我。
提前致谢:)
最佳答案
例如:
void Page_PreInit(Object sender, EventArgs e)
{
this.MasterPageFile = "~/NewMaster.master";
}
根据需要应用条件。来自 here .
关于c# - 如何在运行时更改页面的母版页?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22354443/