好吧,我敢肯定這肯定是我的一個愚蠢的錯誤,但我找不到問題在哪裏,並且它在推動我堅果。在主頁(MVC2)的HTML標題標籤中的ContentPlaceHolder的好奇問題
我有一個母版頁,有這樣的:
<head runat="server">
<title>
<asp:ContentPlaceHolder ID="TitleContent" runat="server" /> - Company
</title>
</head>
這只是通過VS插入當我創造,我剛添加的母版默認的HTML「 - 公司」的結尾,讓我不不得不在每一個視圖中重複這些文本。
上的意見,我有,例如,這樣的:
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
Some title for the view
</asp:Content>
正如你可以想像,最後的結果是不是我的預期。取而代之的
<title>Some title for the View - Company</title>
我越來越:
<title>Some title for the View</title>
爲什麼?
「這是在推動我的堅果。」聽起來很痛苦,希望你能解決它。 – 2010-08-17 12:08:13
哈哈!在所有的單詞中輸入錯誤...修復; D – salgiza 2010-08-17 12:12:39