473,385 Members | 1,753 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

master pages - is it just me not comfortable with them?


I'm an experienced web developer - but haven't used master pages much.

I find that I'm not really comfortable with them - so perhaps I'm
missing something.....

When I first read about them I was shocked that the content
placeholder pages need knowledge of which master page they were in -
I'm happier now I understand they can be set dynamically - but I still
can't help thinking that they provide nothing on top of a reasonable
page/usercontrol design ....

....in fact I prefer a design where there's only ever *one* aspx page
per site - and everything else is written as UserControls (probably
loaded dynamically with LoadControl)... this gives nice
componentisation and ultimate flexibility.

I tend to work in Enterprise environments.

....I'd appreciate any comments on this.

thanks,
O.
Dec 13 '07 #1
7 1325
I am very comfortable with them. In fact, I doubt that I would design
another site without them - - it's the quick and easy way for a consistent
look and feel - even nested, for, let's say, a company and it's departments
(especially since it's supported better with VS.Net 2008)

When you look at it - a Master page is pretty much the same as a
usercontrol - and it's referenced on each page, in the same way a user
control would be - and since, as you say, it can be set dynamically, just as
a user control would be, what's your root problem with them?

David Wier
http://aspnet101.com
http://iWritePro.com - One click PDF, convert .doc/.rtf/.txt to HTML with no
bloated markup
<ol*******@googlemail.comwrote in message
news:53**********************************@d4g2000p rg.googlegroups.com...
>
I'm an experienced web developer - but haven't used master pages much.

I find that I'm not really comfortable with them - so perhaps I'm
missing something.....

When I first read about them I was shocked that the content
placeholder pages need knowledge of which master page they were in -
I'm happier now I understand they can be set dynamically - but I still
can't help thinking that they provide nothing on top of a reasonable
page/usercontrol design ....

...in fact I prefer a design where there's only ever *one* aspx page
per site - and everything else is written as UserControls (probably
loaded dynamically with LoadControl)... this gives nice
componentisation and ultimate flexibility.

I tend to work in Enterprise environments.

...I'd appreciate any comments on this.

thanks,
O.

Dec 13 '07 #2
A common confusion about master pages is that they are thought of as a sort
of iframes rather than a sort of user controls. They are a sort of extension
of user control concept in a very convenient form.

--
Eliyahu Goldin,
Software Developer
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net
<ol*******@googlemail.comwrote in message
news:53**********************************@d4g2000p rg.googlegroups.com...
>
I'm an experienced web developer - but haven't used master pages much.

I find that I'm not really comfortable with them - so perhaps I'm
missing something.....

When I first read about them I was shocked that the content
placeholder pages need knowledge of which master page they were in -
I'm happier now I understand they can be set dynamically - but I still
can't help thinking that they provide nothing on top of a reasonable
page/usercontrol design ....

...in fact I prefer a design where there's only ever *one* aspx page
per site - and everything else is written as UserControls (probably
loaded dynamically with LoadControl)... this gives nice
componentisation and ultimate flexibility.

I tend to work in Enterprise environments.

...I'd appreciate any comments on this.

thanks,
O.

Dec 13 '07 #3
I'm an experienced web developer - but haven't used master pages much.

I find that I'm not really comfortable with them - so perhaps I'm
missing something.....

When I first read about them I was shocked that the content
placeholder pages need knowledge of which master page they were in -
I'm happier now I understand they can be set dynamically - but I still
can't help thinking that they provide nothing on top of a reasonable
page/usercontrol design ....
I tend to use them precisely for page design. IMO that's *is* their purpose.
...in fact I prefer a design where there's only ever *one* aspx page
per site - and everything else is written as UserControls (probably
loaded dynamically with LoadControl)... this gives nice
componentisation and ultimate flexibility.
I've had that thought too, but never pursued it. For something like a
web-mail client it might work.

It sounds like you might also be a fan of MVC. Check out the new MVC stuff
for asp.net.
http://weblogs.asp.net/scottgu/archi...framework.aspx

Dec 13 '07 #4
<ol*******@googlemail.comwrote in message
news:53**********************************@d4g2000p rg.googlegroups.com...

I'm totally comfortable with them to the extent where I doubt I'd ever
consider designing another web app without them...
...in fact I prefer a design where there's only ever *one* aspx page
per site - and everything else is written as UserControls (probably
loaded dynamically with LoadControl)... this gives nice
componentisation and ultimate flexibility.
A MasterPage is a UserControl...
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Dec 13 '07 #5
Just my 2 cents.

1. Try to use master pages. You are going to love them. I have couple
internal rules for myself for any .NET project that I start and one of them
is "Always create and use MasterPage" even if it's empty...

2. Design when there is only one default.aspx page is workable. I actually
have developed E-commerce projects which has only on default.aspx (it's
completely functional and working, about 3 thousand visitors a day).

The only problem with this approach is that people love to have different
URLs. They like ability to add them to "My Favorites" or send a link to
their buddies in email...
So one page approach presents some challenges and usually needs a URL
rewriting.
Here is my site: http://www.mspiercing.com try to hit it. You will never
tell that in reality there is only one default.aspx page there.

But from my experience, unless you are developing "framework" like
DotNetNuke, the single page design is not worth all problems it creates in
most projects.
I do believe in nice structurization though. So forum aspx pages reside in
"forum" folder, picture gallery in "gallery" folder....
George.


<ol*******@googlemail.comwrote in message
news:53**********************************@d4g2000p rg.googlegroups.com...
>
I'm an experienced web developer - but haven't used master pages much.

I find that I'm not really comfortable with them - so perhaps I'm
missing something.....

When I first read about them I was shocked that the content
placeholder pages need knowledge of which master page they were in -
I'm happier now I understand they can be set dynamically - but I still
can't help thinking that they provide nothing on top of a reasonable
page/usercontrol design ....

...in fact I prefer a design where there's only ever *one* aspx page
per site - and everything else is written as UserControls (probably
loaded dynamically with LoadControl)... this gives nice
componentisation and ultimate flexibility.

I tend to work in Enterprise environments.

...I'd appreciate any comments on this.

thanks,
O.

Dec 13 '07 #6
Another 2 cents: Master Pages are extremely useful and flexible, once you
get past the initial learning curve (which is well worth the effort).

I'd highly recommend spending some time with Scott's detailed post here:

http://www.odetocode.com/Articles/450.aspx

-- Peter
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
MetaFinder: http://www.blogmetafinder.com
"ol*******@googlemail.com" wrote:
>
I'm an experienced web developer - but haven't used master pages much.

I find that I'm not really comfortable with them - so perhaps I'm
missing something.....

When I first read about them I was shocked that the content
placeholder pages need knowledge of which master page they were in -
I'm happier now I understand they can be set dynamically - but I still
can't help thinking that they provide nothing on top of a reasonable
page/usercontrol design ....

....in fact I prefer a design where there's only ever *one* aspx page
per site - and everything else is written as UserControls (probably
loaded dynamically with LoadControl)... this gives nice
componentisation and ultimate flexibility.

I tend to work in Enterprise environments.

....I'd appreciate any comments on this.

thanks,
O.
Dec 13 '07 #7
i never use them
i have base page class, and some other class that inherits it
so if i want my aspx page to load some particular template, i inherit
a particular class
i always use dynamic loading of asxc file, one header, and one footer.
after my client login, the pages inherits a different class.
so in the actual aspx code, i don't set any masterpage or include any
header/footer file.

i guess there's no wrong in using masterpages, but like you, im
uncomfortable with it.
On Dec 13, 11:16 pm, olihar...@googlemail.com wrote:
I'm an experienced web developer - but haven't used master pages much.

I find that I'm not really comfortable with them - so perhaps I'm
missing something.....

When I first read about them I was shocked that the content
placeholder pages need knowledge of which master page they were in -
I'm happier now I understand they can be set dynamically - but I still
can't help thinking that they provide nothing on top of a reasonable
page/usercontrol design ....

...in fact I prefer a design where there's only ever *one* aspx page
per site - and everything else is written as UserControls (probably
loaded dynamically with LoadControl)... this gives nice
componentisation and ultimate flexibility.

I tend to work in Enterprise environments.

...I'd appreciate any comments on this.

thanks,
O.
Dec 14 '07 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Murphy | last post by:
I have read the articles by Paul Wilson regarding master pages, and apart from being totally confused I would like to clarify the following before investing any further time on researching these...
20
by: Alan Silver | last post by:
Hello, In classic ASP, I used to use two include files on each page, one before and one after the main content, to provide a consistent layout across a web site. That way I could just change the...
3
by: Mike Dee | last post by:
I posted this back in November 2005 a couple times but did not get any responses. I'm hoping someone here can please shed some light on this. I'm new to index server and can't get any DocTitle...
17
by: Rob R. Ainscough | last post by:
Again another simple concept that appears NOT to be intuitive or I'm just stupid. I've read the WROX book and the example doesn't actually show how the .master page links in the other content...
7
by: xkeops | last post by:
Thinking of creating a website, most of the pages will have a general toolbar menu, a content and a footer. The content will be the only one who's gonna change but the rest (header,footer) will...
3
by: William Youngman | last post by:
I am on a team that is developing a proposal generation web application and we are using a custom base page (ProGenBase.cs) located in the app_code directory and all of the app's web pages inherit...
4
by: Cirene | last post by:
I am using VS.NET 2008. In Dreamweaver you can create page templates (equivalent to Master Pages) and make HTML documents based on them. In VS.NET can you have a HTML file linked to a Master...
2
by: Mark B | last post by:
I have done about 30 pages of a new site. I just experimented with applying a global theme that I downloaded from the net. It seemed to work as described, applying colors, fonts etc to all pages. ...
4
by: daveh551 | last post by:
I've seen reference to Nested Master Pages in some of the documentation, but I haven't been successful in creating one in VS 2005 (Framework 2.0). I just did a search on it, and "How To:...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.