[ACCEPTED]-Apply CSS to Content Page in Asp.NET-css
Accepted answer
Normally I put a content placeholder in 6 the head section of the master page. That 5 way any content page can add extra css/js/etc 4 references to the head of the page.
In your 3 master page put the following
<head>
... title, meta tags, js and css links ...
<asp:contentPlaceholder id="head" runat="server" />
</head>
Then in your 2 pages you can include extra elements in 1 the head using this
<asp:content contentplaceholderid="head" runat="server">
<link rel="stylesheet" href="css/lightbox.css" type="text/css" media="screen" />
</asp:content>
Put a content placeholder in the head portion 4 of your master page. Not all content pages 3 will need to place anything in it but this 2 particular content page can place the CSS 1 file you want to link.
You can't apply a style sheet to a content 1 page only, it applies to the whole web page.
Source:
stackoverflow.com
More Related questions
Cookie Warning
We use cookies to improve the performance of the site. By staying on our site, you agree to the terms of use of cookies.