Master/Slave Pages

icemanind

Member
Joined
Mar 20, 2008
Messages
12
Programming Experience
5-10
Hi guys,

I am using Visual Studio 2005 and VB.NET. I am creating an ASP.NET application which has a CSS Layout with a header and a footer. In my master page, I have a ContentPlaceHolder where the header and footer are. My question is, is there a way to place default content in those sections, but only if the ContentPlaceHolder in the slave page is empty?
 
I haven't done anything like this before but I would take a look at setting up a handler OnInit or OnLoad for the ContentPlaceHolder control.
 
I think you got it backwards, the purpose of the master page is to provide the default content (like header/footer) that doesn't change between the different content pages.
That said, what you place inside the master contentholder is rendered if no content from a content page is put there.
 
Back
Top