View Single Post
  #7 (permalink)  
Old May 30th, 2012, 06:44 PM
Pdesignz Pdesignz is offline
Authorized User
Points: 60, Level: 1
Points: 60, Level: 1 Points: 60, Level: 1 Points: 60, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: May 2010
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks Imar, so I think I am understanding what you are saying...Anything that is in the ContentPlaceHolder on the master page would be overwritten if anything is added to the ContentPlaceHolder on the content page.

Your recommendation is add any css files or script files outside the ContentPlaceHolder on the master page and then to add any meta tags or anything that will change from page to page with the ContentPlaceHolder on the content page


Master...


<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">
</asp:ContentPlaceHolder>

Content...

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
<meta name="keywords" content="" />
<meta name="description" content="" />
</asp:Content>

Or is it better to have it contained in the ContentPlaceHolder like so...

Master

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

Content...

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
<meta name="keywords" content="" />
<meta name="description" content="" />
<link href="../Styles/styles.css" rel="stylesheet" type="text/css" />
<script src="../scripts/jquery-1.7.2.min.js" type="text/javascript"></script>

</asp:Content>
Reply With Quote