View Single Post
  #6 (permalink)  
Old May 30th, 2012, 05:30 PM
Imar's Avatar
Imar Imar is offline
Wrox Author
Points: 72,055, Level: 100
Points: 72,055, Level: 100 Points: 72,055, Level: 100 Points: 72,055, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,086
Thanks: 80
Thanked 1,587 Times in 1,563 Posts

No, that would still whipe out the content by the content pages (content in a CPH only serves as a default). I would do this:

<link href="../Styles/styles.css" rel="stylesheet" type="text/css" />
<script src="../scripts/jquery-1.7.2.min.js" type="text/javascript"></script> 
<asp:ContentPlaceHolder id="head" runat="server">
This puts the CSS and JavaScript outside the CPH so it's always added to the page.

Then, in a content page, you add this to the <Content /> control for the Head CPH:

<meta name="keywords" content="" />
<meta name="description" content="" />

Hope this helps,

Imar Spaanjaars
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
Reply With Quote