Master pages - Do people use them?

G

Guest

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
 
M

Mark Rae [MVP]

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...
 
A

Aidy

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.
 
G

Guest

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
 
R

randy.buchholz

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?
 
M

Mark Rae [MVP]

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...
 
M

Mark Rae [MVP]

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...
 
G

Guest

You've all convinced be completely. I'll get to know them. They sound very
useful

Many thanks for your points of view

Ant
 
G

Guest

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.
 
M

Mark Rae [MVP]

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.

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
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top