开发者

Where to add Link tags on a page that's got a master page?

When I type it here :-

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder开发者_如何转开发2" Runat="Server">

<link href="Skins/SkinCustom/Editor.Default.css" rel="stylesheet" type="text/css" />

</asp:Content>

Its says Element Link cannot be nested within div...how am I supposed to link my css files ??


Add a ContentPlaceHolder in your master's head tag:

<head>
    <asp:ContentPlaceHolder ID="head" runat="server"></asp:ContentPlaceHolder>
</head>

Then in your content page:

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    <link href="Skins/SkinCustom/Editor.Default.css" rel="stylesheet" type="text/css" />
</asp:Content>


If your master page does not provide a content placeholder in the <head> section (ed: and you can't edit it), you may be out of luck.

Have a look at the master page source and see what other content placeholders are available.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜