473,569 Members | 2,844 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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
componentisatio n and ultimate flexibility.

I tend to work in Enterprise environments.

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

thanks,
O.
Dec 13 '07 #1
7 1340
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*******@goog lemail.comwrote in message
news:53******** *************** ***********@d4g 2000prg.googleg roups.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
componentisatio n 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*******@goog lemail.comwrote in message
news:53******** *************** ***********@d4g 2000prg.googleg roups.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
componentisatio n 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
componentisatio n 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*******@goog lemail.comwrote in message
news:53******** *************** ***********@d4g 2000prg.googleg roups.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
componentisatio n 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*******@goog lemail.comwrote in message
news:53******** *************** ***********@d4g 2000prg.googleg roups.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
componentisatio n 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*******@goog lemail.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
componentisatio n 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...@googl email.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
componentisatio n 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
290
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 concepts. Are master pages reliable or are they a buggy concept ? I understand master pages will be included in the next version of the framework ?...
20
2402
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 include files to change the layout. When I came to ASP.NET, I used user controls to do a similar thing. I have just been looking at master...
3
1535
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 value back from index server (it is returned as null) for all my aspx pages. It do get the values from inside the <title> tags from my static .htm...
17
3141
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 pages? Kinda sorta a critical point no? Am I missing something? Rob. P.S. the day I find a book that actually is useful rather than just a
7
8692
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 remain the same. I am interested to know your opinions/suggestions in finding an easy way of doing it. In asp one could have something like this:
3
2353
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 from this custom page. Additionally I have a main menu tab control that is located in a master page and certain tabs are displayed dependant on the...
4
2009
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 Page?
2
1175
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. Now I am thinking to create a Master Page so that I can have: - A company logo (top-left) - A horizontal navigation bar (top) - A standard...
4
1589
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: Walkthrough" on Master pages listed VS 2008 and Framework 3.5 as pre- requisites. If I do an "Add New Item" selecting "Master Page", the "Use MasterPage"...
0
7695
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
8119
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7668
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7964
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5509
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5218
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3653
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
2111
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1209
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.