Click here to Skip to main content
15,897,968 members
Articles / Web Development / ASP.NET

MasterPages reinvented - a Component Based Template Engine for ASP.NET

Rate me:
Please Sign up or sign in to vote.
4.83/5 (124 votes)
27 Apr 2005CPOL9 min read 993.7K   4.2K   266  
User-friendly but powerful template engine which provides clean and painless separation of content and MasterPages (templates).
<%@ Control Language="c#" AutoEventWireup="false" Codebehind="initializationtemplate.ascx.cs" Inherits="templatedemo.templateinitialization.initializationtemplate" TargetSchema="http://schemas.microsoft.com/intellisense/ie5"%>
<%@ Register TagPrefix="epf" Namespace="Evolve.Portals.Framework" Assembly="Evolve.Portals.TemplateEngine" %>
<div class="contentcell">
  <P><epf:regionplaceholder id="RegionPlaceHolder1" runat="server" RegionId="Content"></epf:regionplaceholder></P>
  <P><U>Before Templating:</U></P>
  <P>
    <table cellSpacing="0" cellPadding="0" border="0">
      <tr>
        <td width="200">Page property:</td>
        <td width="200"><asp:label id="PageBeforeTemplating" runat="server"></asp:label></td>
      </tr>
      <tr>
        <td>Submitted page parameter:</td>
        <td><asp:label id="ParameterBefore" runat="server"></asp:label></td>
      </tr>
      <tr>
        <td>Controls:</td>
        <td><asp:label id="ChildsBeforeTemplating" runat="server"></asp:label></td>
      </tr>
    </table>
  </P>
  <P><U><BR>
      After Templating:</U></P>
  <P>
    <table border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td width="200">Page property:</td>
        <td width="200"><asp:label id="PageAfterTemplating" runat="server"></asp:label></td>
      </tr>
      <tr>
        <td>Submitted page parameter:</td>
        <td><asp:label id="ParameterAfter" runat="server"></asp:label></td>
      </tr>
      <tr>
        <td>Controls:</td>
        <td><asp:label id="ChildsAfterTemplating" runat="server"></asp:label></td>
      </tr>
    </table>
  </P>
  <P><U><BR>
      Page_Load</U></P>
  <P>
    <asp:Label id="PageLoadStatus" runat="server">NOT CALLED</asp:Label></P>
</div>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Architect I'm a gun for hire
Switzerland Switzerland
Philipp is an independent software engineer with great love for all things .NET.
He lives in Winterthur, Switzerland and his home on the web is at http://www.hardcodet.net.

Comments and Discussions