Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Master page as default

Reply
Thread Tools

Master page as default

 
 
Rohit
Guest
Posts: n/a
 
      10-19-2007
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?

 
Reply With Quote
 
 
 
 
Mark Rae [MVP]
Guest
Posts: n/a
 
      10-19-2007
"Rohit" <> wrote in message
news: oups.com...

> 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

 
Reply With Quote
 
 
 
 
Ian Semmel
Guest
Posts: n/a
 
      10-19-2007
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?


 
Reply With Quote
 
S_K
Guest
Posts: n/a
 
      10-19-2007
On Oct 19, 12:45 pm, "Ian Semmel" <any...@rocketcomp.com.au> 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.


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to Access Master Page Controls from page.aspx doesn't inherit from master SerpentKiss2010 ASP .Net 0 04-06-2011 02:46 PM
Setting the value of a Master page's control's property using a property of the Master page Nathan Sokalski ASP .Net 25 03-04-2010 03:42 AM
Can a master page be built from another master page Zeba ASP .Net 1 02-22-2007 10:55 AM
Cross Page Post Back When Using Mixture of Master Pages and Non-Master Pages Jason@webbit.com ASP .Net 1 05-16-2006 02:00 PM
seeking servlet "Master" keep getting "Master/servlet/Master" not found. Tomcat 5.0.25 Doug McCann Java 1 08-05-2004 09:16 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57