Thursday, June 12, 2008

Convert regular ASPX pages to content pages

 

1) Remove DOCTYPE.

2) Remove html, head, body, and form HTML tags.

3) Add the following to the page directive: MasterPageFile="~/MyMasterPage.master"

4) Add <asp:Content ID="Content1" ContentPlaceHolderID="MyContentPlaceHolderId" runat="server">My page contents</asp:Content>

All the page contents should be surrounded by <asp:Content> tag. Therefore, My Page Contents should be replaced by the remaining  HTML code.

No comments: