为什么asp:ContentPlaceHolders有开始和结束标签?

时间:2012-07-25 13:44:29

标签: asp.net

我试过谷歌搜索。 (和MSDN一样。)

我也试过把文字放在那里,但它没有任何效果。

编辑:我的意思是:与单标签元素相反:<asp:ContentPlaceHolder ... />

2 个答案:

答案 0 :(得分:3)

用于指定默认内容。

<asp:ContentPlaceHolder>
   <!-- what's in here is the default content if the placeholder's content never gets set elsewhere-->
</asp:ContentPlaceHolder>

Here's an example

答案 1 :(得分:1)

IT无需打开和关闭。见下文:

<asp:ContentPlaceHolder />

以上将有效。

相关问题