Master Page

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • MicheleW
    New Member
    • May 2007
    • 8

    Master Page

    How do you create a Master Page? Thanx...
  • jeffstl
    Recognized Expert Contributor
    • Feb 2008
    • 432

    #2
    This is sort of a basic question isn't it? You can find the answer on a multitude of sites but I guess I'll go ahead and display

    Code:
    <%@ Master %>
    
    <html>
    <body>
    
    Here is where my Master Content goes
    
    <asp:ContentPlaceHolder id="MyMasterContent" runat="server">
    </asp:ContentPlaceHolder>
    
    </body>
    </html>
    Then you just name it Whatever.master

    Then I guess to complete the answer in any .aspx page, you just have

    Code:
    <%@ Page MasterPageFile="Whatever.master" language="VB" %>
    'whatever other namespaces you wish to load
    
    <asp:Content
    ContentPlaceHolderId="MyMasterContent" runat="server">
    Thats it :-)

    Comment

    • DrBunchman
      Recognized Expert Contributor
      • Jan 2008
      • 979

      #3
      Also, you've posted your question in the ASP Forum which is for Classic ASP only - I've moved it for you but in future please post all ASP.NET questions in the .NET Forum.

      Thanks,

      Dr B

      Comment

      • Frinavale
        Recognized Expert Expert
        • Oct 2006
        • 9749

        #4
        All the information you need on MasterPages and any other .NET controls can be found in the MSDN Library. This resource should get you pointed in the right direction....th ere are multiple articles on the MasterPages there. I recommend bookmarking the MSDN Library and using it as your primary resource when developing in .NET.

        Please take the time to research the problem before you post your question. The experts here are more than willing to help you with a specific problem but you have to do your part to learn the basics. Please take the time to read over the posting guidelines specifically the section on Before you post your question.

        -Moderator Frinny

        Comment

        • MicheleW
          New Member
          • May 2007
          • 8

          #5
          Thank you..I'm green with this. But I do understand. Have a great day!

          Comment

          Working...