473,698 Members | 2,179 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Master pages - organising layout - contentplacehol der confusion

Ok

Im a bit confused with contentplace holders?!!

Should i use div all the time within them?

--
--------------------------------- --- -- -
Posted with NewsLeecher v3.5 Beta 10
Web @ http://www.newsleecher.com/?usenet
------------------- ----- ---- -- -

Jun 1 '06 #1
5 1636
Quick answer is yes, we use divs all the time withing the MasterPage as well
as the content pagesThe content template is actually only used at design
time and is not actually compiled as such -- only its contents -- which is
why they are called "place holders."

You can start getting deeper insight by keeping trace enabled in a page
while designing and building. Read the control tree and look for your
controls. You'll observe controls prefixed with ctl0 and so on which again
are place holding identifiers to allow the compiler to manage the control
tree hierarchy.

You are going to have to really understand this when you start trying to
reference controls and their properties. At first it can be very confusing
when a control is a child of a child of a child of a parent control which
can be very common when working with templated controls.
Templating becomes a neccessity when one realizes the canned login controls
and other canned controls in 2.0 are often insufficient for real world
applications and have to be taken apart and rebuilt using templates which
contain our own HTML and CSS.
<%= Clinton Gallagher
NET csgallagher AT metromilwaukee. com
URL http://www.metromilwaukee.com/clintongallagher/

"kd" <kd****@spam.co m> wrote in message
news:44******** **************@ news.usenetmons ter.com...
Ok

Im a bit confused with contentplace holders?!!

Should i use div all the time within them?

--
--------------------------------- --- -- -
Posted with NewsLeecher v3.5 Beta 10
Web @ http://www.newsleecher.com/?usenet
------------------- ----- ---- -- -

Jun 2 '06 #2
The div is a great container control, but you are not limited to a <DIV> to
organize content within a placeholder. It is really your decision. The div
makes it easy to add styles to a complete section, however, so it is a nice
way to encapsulate a particular area.

--
Gregory A. Beamer

*************** *************** *************** ****
Think Outside the Box!
*************** *************** *************** ****
"kd" <kd****@spam.co m> wrote in message
news:44******** **************@ news.usenetmons ter.com...
Ok

Im a bit confused with contentplace holders?!!

Should i use div all the time within them?

--
--------------------------------- --- -- -
Posted with NewsLeecher v3.5 Beta 10
Web @ http://www.newsleecher.com/?usenet
------------------- ----- ---- -- -

Jun 2 '06 #3
Thanks!

What else can i use besides DIV?


--
--------------------------------- --- -- -
Posted with NewsLeecher v3.5 Final
Web @ http://www.newsleecher.com/?usenet
------------------- ----- ---- -- -

Jun 2 '06 #4
The master page has content holders <asp:ContentHol der>. The page itself has
<asp:Content> . What you decide to put in the content tags is your own
decision. I have seen people put tables directly or even use Panels, which
render as <SPAN> tags. This example, amitedly older, uses a table:
http://msdn2.microsoft.com/en-us/library/zhhddkxy.aspx

Admitedly an older article, but it should still work.

The DIV, to me, is the most useful if you are using CSS, which you should be
as it allows you to change things without major editing. If you want to
organize with tables, instead, it is an option, but it locks up your display
and forces a complete redesign to change things. If you want to see the
value of DIVs with CSS, check out:
http://www.csszengarden.com/

Look at the HTML and CSS file separately and you will see the entire layout
is done with CSS. The downside is you may end up with a mixed bag, as your
master page is probably built with tables and your content with CSS, which
can be confusing. :-)

I generally design my sites with PhotoShop (or another graphics program -
Expression Graphic Designer, in beta, is free for now; Paint.NET is also
free, but has fewer options and is difficult for me as a design tool.) I
then lay out a complete page, including common elements, using CSS (static
version). I then apply the common elements to a master page (DWT in non
ASP.NET 2.0 sites) and the rest to content areas. It works rather nicely.

You have to decide how much time you wish to invest in learning these
skills.

Short story: Put what you want in the content tag, but the DIV is a good
container object, esp. if you use CSS.

--
Gregory A. Beamer

*************** *************** *************** ****
Think Outside the Box!
*************** *************** *************** ****
"kd" <kd****@spam.co m> wrote in message
news:44******** *************** @news.usenetmon ster.com...
Thanks!

What else can i use besides DIV?


--
--------------------------------- --- -- -
Posted with NewsLeecher v3.5 Final
Web @ http://www.newsleecher.com/?usenet
------------------- ----- ---- -- -

Jun 2 '06 #5
I'd say the "short story" explains what -- not to -- put into a
ContentPlaeHold er and that would be anything except the head, body or form
elements. Just think of content pages as if they were #included as the same
principles apply.
<%= Clinton Gallagher
NET csgallagher AT metromilwaukee. com
URL http://www.metromilwaukee.com/clintongallagher/

"Cowboy (Gregory A. Beamer)" <No************ @comcast.netNoS pamM> wrote in
message news:ur******** ******@TK2MSFTN GP04.phx.gbl...
The master page has content holders <asp:ContentHol der>. The page itself
has <asp:Content> . What you decide to put in the content tags is your own
decision. I have seen people put tables directly or even use Panels, which
render as <SPAN> tags. This example, amitedly older, uses a table:
http://msdn2.microsoft.com/en-us/library/zhhddkxy.aspx

Admitedly an older article, but it should still work.

The DIV, to me, is the most useful if you are using CSS, which you should
be as it allows you to change things without major editing. If you want to
organize with tables, instead, it is an option, but it locks up your
display and forces a complete redesign to change things. If you want to
see the value of DIVs with CSS, check out:
http://www.csszengarden.com/

Look at the HTML and CSS file separately and you will see the entire
layout is done with CSS. The downside is you may end up with a mixed bag,
as your master page is probably built with tables and your content with
CSS, which can be confusing. :-)

I generally design my sites with PhotoShop (or another graphics program -
Expression Graphic Designer, in beta, is free for now; Paint.NET is also
free, but has fewer options and is difficult for me as a design tool.) I
then lay out a complete page, including common elements, using CSS (static
version). I then apply the common elements to a master page (DWT in non
ASP.NET 2.0 sites) and the rest to content areas. It works rather nicely.

You have to decide how much time you wish to invest in learning these
skills.

Short story: Put what you want in the content tag, but the DIV is a good
container object, esp. if you use CSS.

--
Gregory A. Beamer

*************** *************** *************** ****
Think Outside the Box!
*************** *************** *************** ****
"kd" <kd****@spam.co m> wrote in message
news:44******** *************** @news.usenetmon ster.com...
Thanks!

What else can i use besides DIV?


--
--------------------------------- --- -- -
Posted with NewsLeecher v3.5 Final
Web @ http://www.newsleecher.com/?usenet
------------------- ----- ---- -- -


Jun 2 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
2512
by: Andrew Kidd | last post by:
Hi, I've just been working through several examples of how to create Master pages and then create content pages which are linked, but I cannot see the Master page when I'm viewing the content page in "Design", nor do I see it when I'm viewing the page in the browser. I'm adding the Master page through the Add New Item dialog, and creating Web Forms with the "Select Master Page" option checked, then selecting the Master page from the...
17
3155
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
8708
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:
4
1471
by: D | last post by:
Hi, I've been toying around with master pages and am trying to set up your standard banner across the top and 3 areas below that, left content, center content and right content. I have the banner part being the top level master page and the left content be nested master page named subMaster.master. In this I have 3 div's that I've named
4
5606
by: Jeff Allan | last post by:
Hello, I am starting to use Master pages. I understand the concept that these pages should remain passive. So, I need a little assistance. Scenario: 1. Master page with a search box & submit button 2. several pages that use this master page 3. based on the value placed in the search box, I want to refresh the data
3
2447
by: Ronald S. Cook | last post by:
For my web pages that have an associated master page, when I try to work with them in design mode, I get this "gray film" over it and I can edit only the master. How can I get to my page in design mode without having to remove the association with the master page? Thanks, Ron
4
18000
by: Rob | last post by:
Hi, I have a master page that contains a table layout. The contentplaceholder is located in one of the table cells. With frames technology it was possible for hyperlinks to load the linked pages into a frame without having to reload any other frames. Is it possible to replicate this kind of behaviour using master pages and content pages? In other words, I want only the cell that contains the contentplaceholder to refresh when the...
5
1518
by: =?Utf-8?B?QW50?= | last post by:
Hi, I'm a newbie to the Master page. When i drag an image directly onto the master page from say my image folder, it is reflected in all pages which use it, however, if I drag a table, layout, image control etc onto the master page, I don't see these added to any of the pages that is using the Master page as a template even after I save & rebuild. Is this expected bahaviour & if so, how do I set up say, menus using a layout or table &...
5
3862
by: Murray | last post by:
Forgive me if this question is too basic, but I'm new to ASP.NET programming, and I can't locate a simple answer to this question. I have a web page that consists of a Master Page and a single contentplaceholder. The master page has a menu bar in it. How do I change the web page that is displayed in the contentplaceholder when I click on a menu item on the master page? It seems like this should be pretty basic, but I can't discover how to...
0
8674
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 usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8604
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9157
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8895
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 most users, this new feature is actually very convenient. If you want to control the update process,...
0
8861
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7728
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4619
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2330
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2001
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.