Master page as default

Discussion in 'ASP .Net' started by Rohit, Oct 19, 2007.

  1. Rohit

    Rohit Guest

    I have added a "Master Page" and noticed it is having the extension
    ".master". I want to set this master page as default and want to open
    it as I open my web-site. I tried to set the startup properties, but
    it gives error for the master page since it does not have an
    extension .aspx. How to make this page as default?
     
    Rohit, Oct 19, 2007
    #1
    1. Advertising

  2. "Rohit" <> wrote in message
    news:...

    > I have added a "Master Page" and noticed it is having the extension
    > ".master". I want to set this master page as default and want to open
    > it as I open my web-site. I tried to set the startup properties, but
    > it gives error for the master page since it does not have an
    > extension .aspx. How to make this page as default?


    A MasterPage is a template which content pages use to provide a common look
    and feel to your site - it is not an aspx page itself.

    In fact, a MasterPage is nothing more than a UserControl. Simply specify the
    content page which you want to be your site's default page...


    --
    Mark Rae
    ASP.NET MVP
    http://www.markrae.net
     
    Mark Rae [MVP], Oct 19, 2007
    #2
    1. Advertising

  3. Rohit

    Ian Semmel Guest

    You create a web form Default.aspx using the master page and just don't
    add any extra content.

    >
    > I have added a "Master Page" and noticed it is having the extension
    > ".master". I want to set this master page as default and want to open
    > it as I open my web-site. I tried to set the startup properties, but
    > it gives error for the master page since it does not have an
    > extension .aspx. How to make this page as default?
     
    Ian Semmel, Oct 19, 2007
    #3
  4. Rohit

    S_K Guest

    On Oct 19, 12:45 pm, "Ian Semmel" <> wrote:
    > You create a web form Default.aspx using the master page and just don't
    > add any extra content.
    >
    >
    >
    >
    >
    > > I have added a "Master Page" and noticed it is having the extension
    > > ".master". I want to set this master page as default and want to open
    > > it as I open my web-site. I tried to set the startup properties, but
    > > it gives error for the master page since it does not have an
    > > extension .aspx. How to make this page as default?- Hide quoted text -

    >
    > - Show quoted text -


    In your Default.aspx page you have the <%@ Page ... %> tag insert
    MasterPageFile="~/MyMasterPage.master". Then just start the
    Default.aspx page as you usually do.
     
    S_K, Oct 19, 2007
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Doug McCann
    Replies:
    1
    Views:
    1,079
    William Brogden
    Aug 5, 2004
  2. Replies:
    1
    Views:
    3,250
    PeterKellner
    May 16, 2006
  3. Zeba
    Replies:
    1
    Views:
    523
    Mark Rae
    Feb 22, 2007
  4. Nathan Sokalski
    Replies:
    25
    Views:
    1,469
    Nathan Sokalski
    Mar 4, 2010
  5. SerpentKiss2010
    Replies:
    0
    Views:
    2,517
    SerpentKiss2010
    Apr 6, 2011
Loading...

Share This Page