By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,357 Members | 1,021 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,357 IT Pros & Developers. It's quick & easy.

Master Pages for websites

P: n/a
Coming from a Dreamweaver/ASP/PHP background. Planning to use Visual Studio
2008 for a website.

Complete newbie question here (please be gentle!):

Do master pages work similar to Dreamweaver templates in that when the
master page is updated, all the child pages created from the master page are
updated and then they all need to be uploaded to the server? Or do you only
have to upload the master page after an update?

Thanks,
Mickey
Aug 20 '08 #1
Share this Question
Share on Google+
6 Replies


P: n/a
You need to add the Master Page to the site, then, for each page you create,
you choose whether or not to use that master page with the new page.
If so, it removes much of the HTML markup for the page, and basically gives
you a contentplaceholder, in which you will insert your content

David Wier
http://aspnet101.com
http://iWritePro.com - One click PDF, convert .doc/.rtf/.txt to HTML with no
bloated markup
http://cg.augustwind.com - ControlGrouper (ASP.Net control) - control
multiple controls with one
"Mickey" <mi****@DELETEMEmicnap.comwrote in message
news:%2***************@TK2MSFTNGP06.phx.gbl...
Coming from a Dreamweaver/ASP/PHP background. Planning to use Visual
Studio 2008 for a website.

Complete newbie question here (please be gentle!):

Do master pages work similar to Dreamweaver templates in that when the
master page is updated, all the child pages created from the master page
are updated and then they all need to be uploaded to the server? Or do
you only have to upload the master page after an update?

Thanks,
Mickey

Aug 20 '08 #2

P: n/a
Thanks for your quick reply.

Soooo....when I update the master page, would I need to only upload the
master page or also upload all the content pages?

Thanks,
Mickey

"David Wier" <dw@dw.comwrote in message
news:uj*************@TK2MSFTNGP03.phx.gbl...
You need to add the Master Page to the site, then, for each page you
create, you choose whether or not to use that master page with the new
page.
If so, it removes much of the HTML markup for the page, and basically
gives you a contentplaceholder, in which you will insert your content

David Wier
http://aspnet101.com
http://iWritePro.com - One click PDF, convert .doc/.rtf/.txt to HTML with
no bloated markup
http://cg.augustwind.com - ControlGrouper (ASP.Net control) - control
multiple controls with one
"Mickey" <mi****@DELETEMEmicnap.comwrote in message
news:%2***************@TK2MSFTNGP06.phx.gbl...
>Coming from a Dreamweaver/ASP/PHP background. Planning to use Visual
Studio 2008 for a website.

Complete newbie question here (please be gentle!):

Do master pages work similar to Dreamweaver templates in that when the
master page is updated, all the child pages created from the master page
are updated and then they all need to be uploaded to the server? Or do
you only have to upload the master page after an update?

Thanks,
Mickey


Aug 20 '08 #3

P: n/a
"Mickey" <mi****@DELETEMEmicnap.comwrote in message
news:%2***************@TK2MSFTNGP06.phx.gbl...
Complete newbie question here (please be gentle!):
Everyone was a newbie on their first day... :-) Welcome to ASP.NET.
Do master pages work similar to Dreamweaver templates in that when the
master page is updated, all the child pages created from the master page
are updated and then they all need to be uploaded to the server? Or do
you only have to upload the master page after an update?
There is one fundamental thing to understand about MasterPages - they are
UserControls. As such, content pages are not created / inherited *from*
them. When a content page is requested, it opens as normal and then a little
way into the page lifecycle it opens its MasterPage which it then uses to
construct the HTML which will be eventually streamed to the client browser.
It does this every time.
The term "MasterPage" is extremely misleading, IMO - if they had been called
something like LayoutControls, that would have made a lot more sense...

However, to answer your question, when you modify a MasterPage, all content
pages which use that MasterPage will show the modifications automatically.
As such, only the update MasterPage needs to be uploaded to the server,
similar to making modifications to a CSS file...
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Aug 20 '08 #4

P: n/a
On 20 Aug, 15:29, "Mickey" <mic...@DELETEMEmicnap.comwrote:
Coming from a Dreamweaver/ASP/PHP background. *Planning to use Visual Studio
2008 for a website.

Complete newbie question here (please be gentle!):

Do master pages work similar to Dreamweaver templates in that when the
master page is updated, all the child pages created from the master page are
updated and then they all need to be uploaded to the server? *Or do youonly
have to upload the master page after an update?

Thanks,
Mickey
Hi Mickey

ASP.NET master pages are a much better system than Dreamweaver
templates. With DW templates the updates occur locally and every
single page that uses the modified template has to be updated on the
site as well. With ASP.NET master pages they actively co-exist with
the content pages on the site and are merged during each request for
the content page. Hence any modifications to the master page takes
effect automatically without touching the content pages.

That said (and before someone jumps on me for it) the DW template
system works the way it does because there is no other means of
providing a common inherited layout with an HTML site. Hence it works
by using special commented areas that the browser ignores but are
recognised by the DW editor. A clever system but necessarliy
cumbersome.
Aug 20 '08 #5

P: n/a
Thank you so much for your responses and explanations! And you were very
gentle. :-D

Mickey
"Mickey" <mi****@DELETEMEmicnap.comwrote in message
news:%2***************@TK2MSFTNGP06.phx.gbl...
Coming from a Dreamweaver/ASP/PHP background. Planning to use Visual
Studio 2008 for a website.

Complete newbie question here (please be gentle!):

Do master pages work similar to Dreamweaver templates in that when the
master page is updated, all the child pages created from the master page
are updated and then they all need to be uploaded to the server? Or do
you only have to upload the master page after an update?

Thanks,
Mickey

Aug 20 '08 #6

P: n/a
It's just like any other page - if you update it, you must upload it to the
server - - you need to only upload updated files
If you change 10 content pages and your master page doesn't change, you just
upload your 10 content pages (assuming you've already uploaded your master
page, initiallly)

David Wier
http://aspnet101.com
http://iWritePro.com - One click PDF, convert .doc/.rtf/.txt to HTML with no
bloated markup
"Mickey" <mi****@DELETEMEmicnap.comwrote in message
news:OJ**************@TK2MSFTNGP04.phx.gbl...
Thanks for your quick reply.

Soooo....when I update the master page, would I need to only upload the
master page or also upload all the content pages?

Thanks,
Mickey

"David Wier" <dw@dw.comwrote in message
news:uj*************@TK2MSFTNGP03.phx.gbl...
>You need to add the Master Page to the site, then, for each page you
create, you choose whether or not to use that master page with the new
page.
If so, it removes much of the HTML markup for the page, and basically
gives you a contentplaceholder, in which you will insert your content

David Wier
http://aspnet101.com
http://iWritePro.com - One click PDF, convert .doc/.rtf/.txt to HTML with
no bloated markup
http://cg.augustwind.com - ControlGrouper (ASP.Net control) - control
multiple controls with one
"Mickey" <mi****@DELETEMEmicnap.comwrote in message
news:%2***************@TK2MSFTNGP06.phx.gbl...
>>Coming from a Dreamweaver/ASP/PHP background. Planning to use Visual
Studio 2008 for a website.

Complete newbie question here (please be gentle!):

Do master pages work similar to Dreamweaver templates in that when the
master page is updated, all the child pages created from the master page
are updated and then they all need to be uploaded to the server? Or do
you only have to upload the master page after an update?

Thanks,
Mickey



Aug 20 '08 #7

This discussion thread is closed

Replies have been disabled for this discussion.