Click here to Skip to main content
15,887,241 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 979.8K   4.2K   266  
User-friendly but powerful template engine which provides clean and painless separation of content and MasterPages (templates).
<VisualStudioProject>
    <CSHARP
        ProjectType = "Web"
        ProductVersion = "7.10.3077"
        SchemaVersion = "2.0"
        ProjectGuid = "{8CD68082-37BF-4EEA-92C2-ACB22F3B50D1}"
    >
        <Build>
            <Settings
                ApplicationIcon = ""
                AssemblyKeyContainerName = ""
                AssemblyName = "templatedemo"
                AssemblyOriginatorKeyFile = ""
                DefaultClientScript = "JScript"
                DefaultHTMLPageLayout = "Grid"
                DefaultTargetSchema = "IE50"
                DelaySign = "false"
                OutputType = "Library"
                PreBuildEvent = ""
                PostBuildEvent = ""
                RootNamespace = "templatedemo"
                RunPostBuildEvent = "OnBuildSuccess"
                StartupObject = ""
            >
                <Config
                    Name = "Debug"
                    AllowUnsafeBlocks = "false"
                    BaseAddress = "285212672"
                    CheckForOverflowUnderflow = "false"
                    ConfigurationOverrideFile = ""
                    DefineConstants = "DEBUG;TRACE"
                    DocumentationFile = ""
                    DebugSymbols = "true"
                    FileAlignment = "4096"
                    IncrementalBuild = "false"
                    NoStdLib = "false"
                    NoWarn = ""
                    Optimize = "false"
                    OutputPath = "bin\"
                    RegisterForComInterop = "false"
                    RemoveIntegerChecks = "false"
                    TreatWarningsAsErrors = "false"
                    WarningLevel = "4"
                />
                <Config
                    Name = "Release"
                    AllowUnsafeBlocks = "false"
                    BaseAddress = "285212672"
                    CheckForOverflowUnderflow = "false"
                    ConfigurationOverrideFile = ""
                    DefineConstants = "TRACE"
                    DocumentationFile = ""
                    DebugSymbols = "false"
                    FileAlignment = "4096"
                    IncrementalBuild = "false"
                    NoStdLib = "false"
                    NoWarn = ""
                    Optimize = "true"
                    OutputPath = "bin\"
                    RegisterForComInterop = "false"
                    RemoveIntegerChecks = "false"
                    TreatWarningsAsErrors = "false"
                    WarningLevel = "4"
                />
            </Settings>
            <References>
                <Reference
                    Name = "System"
                    AssemblyName = "System"
                    HintPath = "..\..\..\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.dll"
                />
                <Reference
                    Name = "System.Web"
                    AssemblyName = "System.Web"
                    HintPath = "..\..\..\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.Web.dll"
                />
                <Reference
                    Name = "System.Drawing"
                    AssemblyName = "System.Drawing"
                    HintPath = "..\..\..\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.Drawing.dll"
                />
                <Reference
                    Name = "System.Data"
                    AssemblyName = "System.Data"
                    HintPath = "..\..\..\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.Data.dll"
                />
                <Reference
                    Name = "System.XML"
                    AssemblyName = "System.Xml"
                    HintPath = "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.XML.dll"
                />
                <Reference
                    Name = "Evolve.Portals.TemplateEngine"
                    AssemblyName = "Evolve.Portals.TemplateEngine"
                    HintPath = "lib\Evolve.Portals.TemplateEngine.dll"
                />
            </References>
        </Build>
        <Files>
            <Include>
                <File
                    RelPath = "default.aspx"
                    SubType = "Form"
                    BuildAction = "Content"
                />
                <File
                    RelPath = "default.aspx.cs"
                    DependentUpon = "default.aspx"
                    SubType = "ASPXCodeBehind"
                    BuildAction = "Compile"
                />
                <File
                    RelPath = "default.aspx.resx"
                    DependentUpon = "default.aspx.cs"
                    BuildAction = "EmbeddedResource"
                />
                <File
                    RelPath = "Web.config"
                    BuildAction = "Content"
                />
                <File
                    RelPath = "communicationsample\IMessageClient.cs"
                    SubType = "Code"
                    BuildAction = "Compile"
                />
                <File
                    RelPath = "communicationsample\IMessageMaster.cs"
                    SubType = "Code"
                    BuildAction = "Compile"
                />
                <File
                    RelPath = "communicationsample\MessageTable.ascx"
                    SubType = "UserControl"
                    BuildAction = "Content"
                />
                <File
                    RelPath = "communicationsample\MessageTable.ascx.cs"
                    DependentUpon = "MessageTable.ascx"
                    SubType = "ASPXCodeBehind"
                    BuildAction = "Compile"
                />
                <File
                    RelPath = "communicationsample\MessageTable.ascx.resx"
                    DependentUpon = "MessageTable.ascx.cs"
                    BuildAction = "EmbeddedResource"
                />
                <File
                    RelPath = "communicationsample\parent.aspx"
                    SubType = "Form"
                    BuildAction = "Content"
                />
                <File
                    RelPath = "communicationsample\parent.aspx.cs"
                    DependentUpon = "parent.aspx"
                    SubType = "ASPXCodeBehind"
                    BuildAction = "Compile"
                />
                <File
                    RelPath = "communicationsample\parent.aspx.resx"
                    DependentUpon = "parent.aspx.cs"
                    BuildAction = "EmbeddedResource"
                />
                <File
                    RelPath = "communicationsample\template.ascx"
                    SubType = "UserControl"
                    BuildAction = "Content"
                />
                <File
                    RelPath = "communicationsample\template.ascx.cs"
                    DependentUpon = "template.ascx"
                    SubType = "ASPXCodeBehind"
                    BuildAction = "Compile"
                />
                <File
                    RelPath = "communicationsample\template.ascx.resx"
                    DependentUpon = "template.ascx.cs"
                    BuildAction = "EmbeddedResource"
                />
                <File
                    RelPath = "img\ci_gradient.gif"
                    BuildAction = "Content"
                />
                <File
                    RelPath = "img\company.jpg"
                    BuildAction = "Content"
                />
                <File
                    RelPath = "lib\Evolve.Portals.TemplateEngine.dll"
                    BuildAction = "Content"
                />
                <File
                    RelPath = "nestedtemplates\maintemplate.ascx"
                    SubType = "UserControl"
                    BuildAction = "Content"
                />
                <File
                    RelPath = "nestedtemplates\maintemplate.ascx.cs"
                    DependentUpon = "maintemplate.ascx"
                    SubType = "ASPXCodeBehind"
                    BuildAction = "Compile"
                />
                <File
                    RelPath = "nestedtemplates\maintemplate.ascx.resx"
                    DependentUpon = "maintemplate.ascx.cs"
                    BuildAction = "EmbeddedResource"
                />
                <File
                    RelPath = "nestedtemplates\nestedtemplate.ascx"
                    SubType = "UserControl"
                    BuildAction = "Content"
                />
                <File
                    RelPath = "nestedtemplates\nestedtemplate.ascx.cs"
                    DependentUpon = "nestedtemplate.ascx"
                    SubType = "ASPXCodeBehind"
                    BuildAction = "Compile"
                />
                <File
                    RelPath = "nestedtemplates\nestedtemplate.ascx.resx"
                    DependentUpon = "nestedtemplate.ascx.cs"
                    BuildAction = "EmbeddedResource"
                />
                <File
                    RelPath = "nestedtemplates\samplepage.aspx"
                    SubType = "Form"
                    BuildAction = "Content"
                />
                <File
                    RelPath = "nestedtemplates\samplepage.aspx.cs"
                    DependentUpon = "samplepage.aspx"
                    SubType = "ASPXCodeBehind"
                    BuildAction = "Compile"
                />
                <File
                    RelPath = "nestedtemplates\samplepage.aspx.resx"
                    DependentUpon = "samplepage.aspx.cs"
                    BuildAction = "EmbeddedResource"
                />
                <Folder RelPath = "pluginsample\" />
                <File
                    RelPath = "styles\evolve.css"
                    BuildAction = "Content"
                />
                <File
                    RelPath = "templateexchange\default.aspx"
                    SubType = "Form"
                    BuildAction = "Content"
                />
                <File
                    RelPath = "templateexchange\default.aspx.cs"
                    DependentUpon = "default.aspx"
                    SubType = "ASPXCodeBehind"
                    BuildAction = "Compile"
                />
                <File
                    RelPath = "templateexchange\default.aspx.resx"
                    DependentUpon = "default.aspx.cs"
                    BuildAction = "EmbeddedResource"
                />
                <File
                    RelPath = "templateinitialization\initializationtemplate.ascx"
                    SubType = "UserControl"
                    BuildAction = "Content"
                />
                <File
                    RelPath = "templateinitialization\initializationtemplate.ascx.cs"
                    DependentUpon = "initializationtemplate.ascx"
                    SubType = "ASPXCodeBehind"
                    BuildAction = "Compile"
                />
                <File
                    RelPath = "templateinitialization\initializationtemplate.ascx.resx"
                    DependentUpon = "initializationtemplate.ascx.cs"
                    BuildAction = "EmbeddedResource"
                />
                <File
                    RelPath = "templateinitialization\samplepage.aspx"
                    SubType = "Form"
                    BuildAction = "Content"
                />
                <File
                    RelPath = "templateinitialization\samplepage.aspx.cs"
                    DependentUpon = "samplepage.aspx"
                    SubType = "ASPXCodeBehind"
                    BuildAction = "Compile"
                />
                <File
                    RelPath = "templateinitialization\samplepage.aspx.resx"
                    DependentUpon = "samplepage.aspx.cs"
                    BuildAction = "EmbeddedResource"
                />
                <File
                    RelPath = "templates\AlternativeTemplate.ascx"
                    SubType = "UserControl"
                    BuildAction = "Content"
                />
                <File
                    RelPath = "templates\AlternativeTemplate.ascx.cs"
                    DependentUpon = "AlternativeTemplate.ascx"
                    SubType = "ASPXCodeBehind"
                    BuildAction = "Compile"
                />
                <File
                    RelPath = "templates\AlternativeTemplate.ascx.resx"
                    DependentUpon = "AlternativeTemplate.ascx.cs"
                    BuildAction = "EmbeddedResource"
                />
                <File
                    RelPath = "templates\MenuTemplate.ascx"
                    BuildAction = "Content"
                />
                <File
                    RelPath = "templates\MenuTemplate.ascx.cs"
                    DependentUpon = "MenuTemplate.ascx"
                    SubType = "ASPXCodeBehind"
                    BuildAction = "Compile"
                />
                <File
                    RelPath = "templates\MenuTemplate.ascx.resx"
                    DependentUpon = "MenuTemplate.ascx.cs"
                    BuildAction = "EmbeddedResource"
                />
            </Include>
        </Files>
    </CSHARP>
</VisualStudioProject>

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