Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / October 2007

Tip: Looking for answers? Try searching our database.

Master pages - Do people use them?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Ant - 19 Oct 2007 14:01 GMT
Hi,
I'm new to the concept of a master page. They seem a little restrictive to
use. Trying to stuff stuff into the content place holder then positioning it
etc. Are they used by people often? Are they a 'standard' tool or something
that is perhaps a bit of an experiment at the moment?

Thanks very much for any ideas on this

Ant
Mark Rae [MVP] - 19 Oct 2007 14:16 GMT
> Trying to stuff stuff into the content place holder then positioning it
> etc.

There's no difference between positioning content in a content place holder
and placing it in a "normal" aspx page...

A MasterPage is nothing more than a UserControl...

> Are they used by people often?

I use them all the time.

> Are they a 'standard' tool or something that is perhaps a bit of an
> experiment at the moment?

Well, they're new in ASP.NET 2, if that's what you mean...

Signature

Mark Rae
ASP.NET MVP
http://www.markrae.net

Ant - 19 Oct 2007 14:57 GMT
Hi Mark,

Thanks very much on your thoughts on this; you're convincing me.

I found though that when you place a button on a page that uses a master
page, it boroadens to the width of the page. Is this an issue or the way it's
meant to work?

Many thanks for your help

ant

> > Trying to stuff stuff into the content place holder then positioning it
> > etc.
[quoted text clipped - 12 lines]
>
> Well, they're new in ASP.NET 2, if that's what you mean...
Mark Rae [MVP] - 19 Oct 2007 16:25 GMT
> I found though that when you place a button on a page that uses a master
> page, it boroadens to the width of the page. Is this an issue or the way
> it's
> meant to work?

If that's the way you have written your MasterPage... :-)

Think of a MasterPage as a template. When you open a content page, it opens
it associated MasterPage and then builds a single page for streaming to the
browser.

When the page has loaded, do a View Source and examine the markup - you'll
soon spot what you've done...

Signature

Mark Rae
ASP.NET MVP
http://www.markrae.net

Aidy - 19 Oct 2007 14:56 GMT
Master pages are a Godsend.  I think MS saw how we all wrote pages in 1.1
and gave us exactly the tool to help us.  Sure it can take a while to get
your head around, but I think they're one of the best new things in 2.0.

> Hi,
> I'm new to the concept of a master page. They seem a little restrictive to
[quoted text clipped - 7 lines]
>
> Ant
Mark Rae [MVP] - 19 Oct 2007 16:27 GMT
> Master pages are a Godsend.  I think MS saw how we all wrote pages in 1.1
> and gave us exactly the tool to help us.  Sure it can take a while to get
> your head around, but I think they're one of the best new things in 2.0.

Absolutely! One of the biggest misconceptions with MasterPages is that
they're somehow the ASP.NET equivalent of framesets. Once people realise
that a MasterPage is nothing more than a UserControl, everything becomes
obvious...

Signature

Mark Rae
ASP.NET MVP
http://www.markrae.net

randy.buchholz - 19 Oct 2007 15:40 GMT
I'm working in a business environment and the combination of master pages
and css is invaluable.  It provide a consistant look and feel no matter who
deos he devleopment. Just wish there was a way to use multiple/cascaded
inheritance with css and masterpages. (I havene't fonud one anyway) I would
like to be able to create a top level corporate m-page and then divisional
m-pages that inherit (and override in some cases) etc.  Anyone doing
anything like that with M-pages?

> Hi,
> I'm new to the concept of a master page. They seem a little restrictive to
[quoted text clipped - 7 lines]
>
> Ant
Ant - 20 Oct 2007 09:43 GMT
You've all convinced be completely. I'll get to know them. They sound very
useful

Many thanks for your points of view

Ant

> I'm working in a business environment and the combination of master pages
> and css is invaluable.  It provide a consistant look and feel no matter who
[quoted text clipped - 15 lines]
> >
> > Ant
Jonny - 23 Oct 2007 20:35 GMT
I've used masterpages quite a bit and they are much better than dealing with
frames.  The only issue that I ran into that I found kinda annoying was the
name mangling that master pages do to the IDs of the HTML content inside of
them.  This most likely isn't an issue unless you are trying to do some
client side stuff.

> Hi,
> I'm new to the concept of a master page. They seem a little restrictive to
[quoted text clipped - 5 lines]
>
> Ant
Mark Rae [MVP] - 23 Oct 2007 20:41 GMT
> I've used masterpages quite a bit and they are much better than dealing
> with
[quoted text clipped - 4 lines]
> them.  This most likely isn't an issue unless you are trying to do some
> client side stuff.

Not even then, so long as you get used to asking ASP.NET what the "mangled"
(as you put it) names are, e.g.

if (document.getElementById('<%=MyTextBox.ClientID%>').value.length == 0)
{
   // do something
}

Signature

Mark Rae
ASP.NET MVP
http://www.markrae.net


Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.