Master page as default

  • Thread starter Thread starter Rohit
  • Start date Start date
R

Rohit

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?
 
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...
 
You create a web form Default.aspx using the master page and just don't
add any extra content.
 
You create a web form Default.aspx using the master page and just don't
add any extra content.






- 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.
 
Back
Top