Mega Code Archive

 
Categories / ASP.Net / User Control And Master Page
 

Put site navigation in the master page

<%@ Page Language="C#" MasterPageFile="~/Default.master" Title="Products" %> <asp:Content ID="Content1" ContentPlaceHolderID="mainContent" Runat="Server"> <h1>Products</h1> <p> infrastructure. </p> <p> and much more. </p> </asp:Content> File: Default.master <%@ Master Language="C#" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head id="Head1" runat="server"> </head> <body>    <form id="form1" runat="server">       <div id="container">          <div id="sideArea">             <div id="menu">                <asp:BulletedList ID="blstSample" runat="server" DisplayMode="HyperLink">                   <asp:ListItem Value="BookHome.aspx">Home</asp:ListItem>                   <asp:ListItem Value="Default.aspx">Products</asp:ListItem>                    <asp:ListItem Value="About.aspx">About</asp:ListItem>                </asp:BulletedList>             </div>             <div id="sideAreaBox">                <asp:ContentPlaceHolder ID="sideContent" runat="server">                  <p>default side content</p>                </asp:ContentPlaceHolder>               </div>                    </div>          <div id="mainArea">             <asp:ContentPlaceHolder ID="mainContent" runat="server">               <p>default main content</p>             </asp:ContentPlaceHolder>          </div>          <div id="footer">             <p>This site is not real.</p>          </div>                </div>    </form> </body> </html>