Click here to Skip to main content
12,889,951 members (41,063 online)
Click here to Skip to main content
Articles » Web Development » ASP.NET » General » Downloads

Tagged as


52 bookmarked
Posted 21 Feb 2012

Beginner's Tutorial on Master Pages in ASP.NET

, 21 Feb 2012 CPOL
Beginner's Tutorial on Master pages in ASP.NET
<%@ Master Language="C#" AutoEventWireup="true" CodeFile="MasterPageOne.master.cs" Inherits="MasterPageOne" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">

<html xmlns="" >
<head runat="server">
    <title>Untitled Page</title>
    <form id="form1" runat="server">
    <div align="center">
        <h1>My Test WebSite</h1>
        <asp:Menu ID="Menu1" runat="server" BackColor="#B5C7DE" DynamicHorizontalOffset="2"
            Font-Names="Verdana" Font-Size="0.8em" ForeColor="#284E98" Orientation="Horizontal"
            <StaticMenuItemStyle HorizontalPadding="5px" VerticalPadding="2px" />
            <DynamicHoverStyle BackColor="#284E98" ForeColor="White" />
            <DynamicMenuStyle BackColor="#B5C7DE" />
            <StaticSelectedStyle BackColor="#507CD1" />
            <DynamicSelectedStyle BackColor="#507CD1" />
            <DynamicMenuItemStyle HorizontalPadding="5px" VerticalPadding="2px" />
                <asp:MenuItem Text="HOME" Value="HOME" NavigateUrl="~/Default.aspx"></asp:MenuItem>
                <asp:MenuItem Text="ABOUT" Value="ABOUT" NavigateUrl="~/about.aspx"></asp:MenuItem>
                <asp:MenuItem Text="CONTACT" Value="CONTACT" NavigateUrl="~/contact.aspx"></asp:MenuItem>
                <asp:MenuItem NavigateUrl="~/Change.aspx" Text="CHANGE" Value="CHANGE"></asp:MenuItem>
            <StaticHoverStyle BackColor="#284E98" ForeColor="White" />
        <div align = "left">
            <asp:Label ID="lblpageName" runat="server"></asp:Label>
        <hr />
        <!-- Here we have content place holder where all content pages will render their controls   -->
        <asp:contentplaceholder id="ContentPlaceHolder1" runat="server">

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.


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


About the Author

Rahul Rajat Singh
Software Developer (Senior)
India India

I Started my Programming career with C++. Later got a chance to develop Windows Form applications using C#. Currently using C#, ASP.NET & ASP.NET MVC to create Information Systems, e-commerce/e-governance Portals and Data driven websites.

My interests involves Programming, Website development and Learning/Teaching subjects related to Computer Science/Information Systems. IMO, C# is the best programming language and I love working with C# and other Microsoft Technologies.

  • Microsoft Certified Technology Specialist (MCTS): Web Applications Development with Microsoft .NET Framework 4
  • Microsoft Certified Technology Specialist (MCTS): Accessing Data with Microsoft .NET Framework 4
  • Microsoft Certified Technology Specialist (MCTS): Windows Communication Foundation Development with Microsoft .NET Framework 4

If you like my articles, please visit my website for more:[^]

  • Microsoft MVP 2015

You may also be interested in...

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.170424.1 | Last Updated 21 Feb 2012
Article Copyright 2012 by Rahul Rajat Singh
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid