Tuesday, January 18, 2011

Content Page

A content page is the part of the website that changes every time you go to a different page of the website. Content pages define the content place holders. Some example code is:

 <%@ Page MasterPageFile="Site.master" %>  
 <asp:content id="Content1" contentplaceholderid="FlowerText" runat="server">  
   With sunshine, water, and careful tending, roses will bloom several times in a season.  
 </asp:content>  
 <asp:content id="Content2" contentplaceholderid="FlowerPicture" runat="server">  
   <asp:Image id="image1" imageurl="~/images/rose.jpg" runat="server"/>  
 </asp:content>  

The contentplaceholderid lets you know what place holder you are working with at the time.

No comments:

Post a Comment