Saturday, July 26, 2008

CSS in Pages with a Master Page

error: Only Content controls are allowed directly in a content page that contains Content controls.

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<style type="text/css">

.style1
{
width: 64px;
}

</style>

<asp:Content ID="Content2" ContentPlaceHolderID="mainCopy" Runat="Server">
</asp:Content>


Please notice you need to put your stylesheet code for your content page in the first content holder.

You can also put your header here, and this header will show on top of you content page , upon your master pages' header.