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

Building a Better ASP.NET 1.1 BasePage Framework

Rate me:
Please Sign up or sign in to vote.
4.52/5 (27 votes)
5 Dec 2005CPOL35 min read 125K   2.1K   156  
This is a journey on how to build a better Base page. The result of this will be a reusable framework that you can use to create as many Base pages as you like (on many different sites) and still have something that will keep the designers on your team happy.
<VisualStudioProject>
    <CSHARP
        ProjectType = "Web"
        ProductVersion = "7.10.3077"
        SchemaVersion = "2.0"
        ProjectGuid = "{EBCB51ED-F606-4009-94EE-DE1CCB3D150D}"
    >
        <Build>
            <Settings
                ApplicationIcon = ""
                AssemblyKeyContainerName = ""
                AssemblyName = "AcmeWidgets"
                AssemblyOriginatorKeyFile = ""
                DefaultClientScript = "JScript"
                DefaultHTMLPageLayout = "Grid"
                DefaultTargetSchema = "IE50"
                DelaySign = "false"
                OutputType = "Library"
                PreBuildEvent = ""
                PostBuildEvent = ""
                RootNamespace = "AcmeWidgets"
                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.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.Web"
                    AssemblyName = "System.Web"
                    HintPath = "..\..\..\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.Web.dll"
                />
                <Reference
                    Name = "System.XML"
                    AssemblyName = "System.Xml"
                    HintPath = "..\..\..\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.XML.dll"
                />
                <Reference
                    Name = "BasePageFrameworkCS"
                    Project = "{AA0763F8-8A9D-4796-A376-4580A7E9A10A}"
                    Package = "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}"
                />
            </References>
        </Build>
        <Files>
            <Include>
                <File
                    RelPath = "AcmeCatalog.aspx"
                    SubType = "Form"
                    BuildAction = "Content"
                />
                <File
                    RelPath = "AcmeCatalog.aspx.cs"
                    DependentUpon = "AcmeCatalog.aspx"
                    SubType = "ASPXCodeBehind"
                    BuildAction = "Compile"
                />
                <File
                    RelPath = "AcmeCatalog.aspx.resx"
                    DependentUpon = "AcmeCatalog.aspx.cs"
                    BuildAction = "EmbeddedResource"
                />
                <File
                    RelPath = "AcmePFView.aspx"
                    SubType = "Form"
                    BuildAction = "Content"
                />
                <File
                    RelPath = "AcmePFView.aspx.cs"
                    DependentUpon = "AcmePFView.aspx"
                    SubType = "ASPXCodeBehind"
                    BuildAction = "Compile"
                />
                <File
                    RelPath = "AcmePFView.aspx.resx"
                    DependentUpon = "AcmePFView.aspx.cs"
                    BuildAction = "EmbeddedResource"
                />
                <File
                    RelPath = "AssemblyInfo.cs"
                    SubType = "Code"
                    BuildAction = "Compile"
                />
                <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 = "Global.asax"
                    SubType = "Component"
                    BuildAction = "Content"
                />
                <File
                    RelPath = "Global.asax.cs"
                    DependentUpon = "Global.asax"
                    SubType = "Code"
                    BuildAction = "Compile"
                />
                <File
                    RelPath = "Global.asax.resx"
                    DependentUpon = "Global.asax.cs"
                    BuildAction = "EmbeddedResource"
                />
                <File
                    RelPath = "PageFour.aspx"
                    SubType = "Form"
                    BuildAction = "Content"
                />
                <File
                    RelPath = "PageFour.aspx.cs"
                    DependentUpon = "PageFour.aspx"
                    SubType = "ASPXCodeBehind"
                    BuildAction = "Compile"
                />
                <File
                    RelPath = "PageFour.aspx.resx"
                    DependentUpon = "PageFour.aspx.cs"
                    BuildAction = "EmbeddedResource"
                />
                <File
                    RelPath = "PageThree.aspx"
                    SubType = "Form"
                    BuildAction = "Content"
                />
                <File
                    RelPath = "PageThree.aspx.cs"
                    DependentUpon = "PageThree.aspx"
                    SubType = "ASPXCodeBehind"
                    BuildAction = "Compile"
                />
                <File
                    RelPath = "PageThree.aspx.resx"
                    DependentUpon = "PageThree.aspx.cs"
                    BuildAction = "EmbeddedResource"
                />
                <File
                    RelPath = "PageTwo.aspx"
                    SubType = "Form"
                    BuildAction = "Content"
                />
                <File
                    RelPath = "PageTwo.aspx.cs"
                    DependentUpon = "PageTwo.aspx"
                    SubType = "ASPXCodeBehind"
                    BuildAction = "Compile"
                />
                <File
                    RelPath = "PageTwo.aspx.resx"
                    DependentUpon = "PageTwo.aspx.cs"
                    BuildAction = "EmbeddedResource"
                />
                <File
                    RelPath = "Web.config"
                    BuildAction = "Content"
                />
                <File
                    RelPath = "AcmeControls\LeftNav.ascx"
                    SubType = "UserControl"
                    BuildAction = "Content"
                />
                <File
                    RelPath = "AcmeControls\LeftNav.ascx.cs"
                    DependentUpon = "LeftNav.ascx"
                    SubType = "ASPXCodeBehind"
                    BuildAction = "Compile"
                />
                <File
                    RelPath = "AcmeControls\LeftNav.ascx.resx"
                    DependentUpon = "LeftNav.ascx.cs"
                    BuildAction = "EmbeddedResource"
                />
                <File
                    RelPath = "AcmeControls\SiteFooter.ascx"
                    SubType = "UserControl"
                    BuildAction = "Content"
                />
                <File
                    RelPath = "AcmeControls\SiteFooter.ascx.cs"
                    DependentUpon = "SiteFooter.ascx"
                    SubType = "ASPXCodeBehind"
                    BuildAction = "Compile"
                />
                <File
                    RelPath = "AcmeControls\SiteFooter.ascx.resx"
                    DependentUpon = "SiteFooter.ascx.cs"
                    BuildAction = "EmbeddedResource"
                />
                <File
                    RelPath = "AcmeControls\Siteheader.ascx"
                    SubType = "UserControl"
                    BuildAction = "Content"
                />
                <File
                    RelPath = "AcmeControls\Siteheader.ascx.cs"
                    DependentUpon = "Siteheader.ascx"
                    SubType = "ASPXCodeBehind"
                    BuildAction = "Compile"
                />
                <File
                    RelPath = "AcmeControls\Siteheader.ascx.resx"
                    DependentUpon = "Siteheader.ascx.cs"
                    BuildAction = "EmbeddedResource"
                />
                <File
                    RelPath = "AcmeSmartState\AcmeSmartApplication.cs"
                    SubType = "Code"
                    BuildAction = "Compile"
                />
                <File
                    RelPath = "AcmeSmartState\AcmeSmartQueryString.cs"
                    SubType = "Code"
                    BuildAction = "Compile"
                />
                <File
                    RelPath = "AcmeSmartState\AcmeSmartSession.cs"
                    SubType = "Code"
                    BuildAction = "Compile"
                />
                <File
                    RelPath = "Base\AcmeBasePage.cs"
                    SubType = "ASPXCodeBehind"
                    BuildAction = "Compile"
                />
                <File
                    RelPath = "Base\AcmeBaseTemplate.ascx"
                    SubType = "UserControl"
                    BuildAction = "Content"
                />
                <File
                    RelPath = "Base\AcmeBaseTemplate.ascx.cs"
                    DependentUpon = "AcmeBaseTemplate.ascx"
                    SubType = "ASPXCodeBehind"
                    BuildAction = "Compile"
                />
                <File
                    RelPath = "Base\AcmeBaseTemplate.ascx.resx"
                    DependentUpon = "AcmeBaseTemplate.ascx.cs"
                    BuildAction = "EmbeddedResource"
                />
                <File
                    RelPath = "Base\AcmePrinterBasePage.cs"
                    SubType = "Code"
                    BuildAction = "Compile"
                />
                <File
                    RelPath = "Base\AcmePrinterTemplate.ascx"
                    SubType = "UserControl"
                    BuildAction = "Content"
                />
                <File
                    RelPath = "Base\AcmePrinterTemplate.ascx.cs"
                    DependentUpon = "AcmePrinterTemplate.ascx"
                    SubType = "ASPXCodeBehind"
                    BuildAction = "Compile"
                />
                <File
                    RelPath = "Base\AcmePrinterTemplate.ascx.resx"
                    DependentUpon = "AcmePrinterTemplate.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
Software Developer (Senior) Priority Courier Experts
United States United States
software developer for about 25 years now.

Comments and Discussions