Re: Master, please help define MASTER PAGE regions for me.
by clintonG » Sun, 04 Feb 2007 06:03:29 GMT
o to http://odetocode.com/ which is known for the best tutorials on
MasterPages for ASP.NET developers.
To answer your questions -- briefly -- the master is like a template all
pages can reuse at runtime. The template can contain any static or dynamic
content that you want to be displayed on each page that uses the master.
Understanding the ContentPlaceHolder (CPH) is initially confusing but really
starts to makes sense once you start using it more. We can put a CPH
anywhere in a master; even the <head> element which is sometimes neccessary
for managing which meta tags are written into specific pages that use the
master.
You see, the master is the entire HTML data structure for the page; the
master contains the html, head, title, body and form elements. A typical but
very simple master might use one CPH. There are zones in a page we call the
"header" which is where the company logo and navigation would be, the "body"
of the page contains a CPH which is where unique content will be displayed
when each page is displayed and the area we know as a "footer" where
copyright and other static content is usually located. That's a template
right? All that really changes is the content displayed in between the
header and the footer.
The CPH has an id in the form of a name=value pair. Let's say its
id="BodyOfPage." From that point on each new "content page" you create does
not use any of the ordinary HTML data structures for the page, i.e. no html,
no head, no title and no body HTML elements -- but -- each content page that
uses the master must include a Content control that has the same id as the
id of the CPH in the master. This is very similar to using #include
directives when scripting with ASP or PHP.
CSS can be used to apply style globally throughout the entire web. That's
its main purpose; declare a style once and reuse that style many times. We
can however declare a unique style that might be used one time in the entire
website. CSS is very flexible.
The general consensus agrees that one of the better reference websites
happens to be W3Schools http://w3schools.com/ noting there are many many
many fine sites you'll be using as you continue to build your body of
knowledge.
<%= Clinton Gallagher
NET csgallagher AT metromilwaukee.com
URL http://clintongallagher.metromilwaukee.com/
MAP http://wikimapia.org/#y=43038073&x=-88043838&z=17&l=0&m=h
"Profit" < XXXX@XXXXX.COM > wrote in message
news: XXXX@XXXXX.COM ...