Search code examples
asp.netmaster-pageslook-and-feel

how to design master page in ASP.net


every one i m new with ASP .net and I dont know how to create master page with ASP .nethelp me plz


This is my Masterpage Markup:

<%@ Master Language="C#" AutoEventWireup="true" CodeFile="MasterPage.master.cs" Inherits="MasterPage" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Untitled Page</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        &nbsp;<table style="width: 874px; height: 592px">
            <tr>
                <td colspan="3" style="height: 9px">
                    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
                    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
                    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
                    <asp:Label ID="Label1" runat="server" Font-Size="X-Large" ForeColor="#C0C000" Text="Sarth Enterprises"></asp:Label></td>
            </tr>
            <tr>
                <td colspan="2" style="height: 15px">
                    <asp:Menu ID="Menu1" runat="server" Orientation="Horizontal">
                        <Items>
                            <asp:MenuItem Text="Home" Value="Home"></asp:MenuItem>
                            <asp:MenuItem Text="Products" Value="Products">
                                <asp:MenuItem Text="AE" Value="AE"></asp:MenuItem>
                                <asp:MenuItem Text="RSQE" Value="RSQE"></asp:MenuItem>
                                <asp:MenuItem Text="Comp. Hardware" Value="Comp. Hardware"></asp:MenuItem>
                            </asp:MenuItem>
                            <asp:MenuItem Text="Contact us" Value="Contact us"></asp:MenuItem>
                            <asp:MenuItem Text="About us" Value="About us"></asp:MenuItem>
                            <asp:MenuItem Text="FAQ" Value="FAQ"></asp:MenuItem>
                        </Items>
                    </asp:Menu>
                </td>
                <td style="width: 106px; height: 15px">
                </td>
            </tr>
            <tr>
                <td style="width: 212px">
                    <br />
                    <asp:Label ID="Label3" runat="server" Text="Member Login"></asp:Label><br />
                    <br />
                    <br />
                    <asp:Label ID="Label4" runat="server" Text="User ID:"></asp:Label>
                    &nbsp; &nbsp; 
                    <asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>
                    &nbsp; &nbsp;
                    <br />
                    <br />
                    <br />
                    <asp:Label ID="Label5" runat="server" Text="Password"></asp:Label>
                    &nbsp; &nbsp;
                    <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox><br />
                    <br />
                    <br />
                    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
                    <asp:Button ID="Button1" runat="server" Text="Login" /><br />
                    <br />
                    <br />
                    <asp:Label ID="Label6" runat="server" Text="For new member,"></asp:Label>
                    <asp:HyperLink ID="HyperLink1" runat="server">Sign UP</asp:HyperLink></td>
                <td style="width: 257px">
                </td>
                <td style="width: 106px">
                </td>
            </tr>
            <tr>
                <td colspan="3">
                    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
                    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
                    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
                    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
                    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
                    &nbsp; &nbsp;
                    <asp:Label ID="Label2" runat="server" Font-Bold="True" ForeColor="#C0C000" Height="19px"
                        Text="Copy right ,resereved @ Sarth enterprises" Width="284px"></asp:Label></td>
            </tr>
        </table>
    </div>
    </form>
</body>
</html>

Solution

  • Master Pages allow you to define the look and feel of an entire website. The following links come from Microsoft. Check them out:

    ASP.NET Master Pages Overview

    Master Pages Tutorials