Master page as default

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?
 
M

Mark Rae [MVP]

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...
 
I

Ian Semmel

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

S_K

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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top