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

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

P: n/a

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
Share this Question
Share on Google+
7 Replies


P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
<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

P: n/a
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

P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.