是否可以创建一个选择另一个母版页的母版页?

时间:2012-12-22 16:19:13

标签: asp.net master-pages

我有一个名为MasterPage.master的母版页。

现在我要创建另一个主页(MasterPage2.master),其MasterPageFileMasterPage.master, 但是,当我创建MasterPage2然后从MasterPage2创建网络表单时,此网络表单中没有ContentPlaceHolder

请为我解释......

2 个答案:

答案 0 :(得分:2)

您要找的是嵌套母版页 谷歌,你将有大量的教程。来自Google的前2个结果:

http://msdn.microsoft.com/en-us/library/x2b3ktt7(v=vs.100).aspx
http://msdn.microsoft.com/en-us/library/bb547109(v=vs.100).aspx

答案 1 :(得分:0)

最有可能:

  • MasterPage2正在使用MasterPage中的ContentPlaceHolder,但没有为您的内容页面添加其他ContentPlaceHolder
  • MasterPage2上的ContentPlaceHolder与MasterPage上的ContentPlaceHolder具有相同的ID

确保MasterPage2的{{1}}具有唯一标识符。