Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
ASP.NET 2.0 Basics If you are new to ASP or ASP.NET programming with version 2.0, this is the forum to begin asking questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old May 21st, 2008, 02:36 PM
Friend of Wrox
 
Join Date: May 2005
Location: , , Norway.
Posts: 189
Thanks: 0
Thanked 0 Times in 0 Posts
Default Placeholder

Hei!
How do I move the placeholders into the right position on the masterpage?
Mvh
grstad
__________________
Internet has become favorable with that tool...thank you Tim Berners-Lee!
  #2 (permalink)  
Old May 21st, 2008, 03:05 PM
planoie's Avatar
Friend of Wrox
Points: 16,481, Level: 55
Points: 16,481, Level: 55 Points: 16,481, Level: 55 Points: 16,481, Level: 55
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2003
Location: Clifton Park, New York, USA.
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

What do you mean by "move them"? Usually, you just put them where you want them in the master layout dictated by the master page.

-Peter
compiledthoughts.com
  #3 (permalink)  
Old May 21st, 2008, 03:23 PM
Friend of Wrox
 
Join Date: May 2005
Location: , , Norway.
Posts: 189
Thanks: 0
Thanked 0 Times in 0 Posts
Default

...if the masterpage holds multiple content placeholders (see page 41 in Beginning ASP.NET C#)then how can I position the "BottomContent" at the bottom of the contentpage? By ordinary HTML? But what is then the purpose of multiple placeholders..? And how do I increase and decrease the size of the contentplaceholders?

Mvh
grstad
  #4 (permalink)  
Old May 21st, 2008, 10:21 PM
planoie's Avatar
Friend of Wrox
Points: 16,481, Level: 55
Points: 16,481, Level: 55 Points: 16,481, Level: 55 Points: 16,481, Level: 55
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2003
Location: Clifton Park, New York, USA.
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

Multiple placeholders are to provide support for being able to provide content for different areas of your master layout. Typically you would have, at a minimum, a main content area. But you might also want to have an area in a left nav column that you could add something to on a page by page basis. Or perhaps there is a content placeholder in the <head> tag (which the master page template creates). This would allow you to create scripts or other page elements that should live in the page head and they will be included in the appropriate place when the content page and master layout are merged.

You can position the content placeholders by whatever means you see fit. You could use traditional tabular layout or use fixed position divs around the content placeholders. That's just a question of how you prefer to do that with regular HTML.

-Peter
compiledthoughts.com
  #5 (permalink)  
Old May 22nd, 2008, 02:54 PM
Friend of Wrox
 
Join Date: May 2005
Location: , , Norway.
Posts: 189
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hei!

Thank you for the answers. I'll finish with a last question for now;
are there any limitations regarding how many contentplaceholders to go on one master-page? What if I have 50 different pages depending on that master-page?

Mvh
grstad
  #6 (permalink)  
Old May 22nd, 2008, 03:06 PM
Friend of Wrox
 
Join Date: May 2005
Location: , , Norway.
Posts: 189
Thanks: 0
Thanked 0 Times in 0 Posts
Default

...sorry, I was asking before thinking it through; I'll have to use that same contentplaceholder, adressing it from eatch of the 50 different pages... recycling it! But never the less, it may be relevant to have several contentplaceholders. But that is not depending on the numbers of content-pages, is it..?

Internet has become favorable with that tool...thank you Tim Berners-Lee!
  #7 (permalink)  
Old May 23rd, 2008, 09:03 AM
planoie's Avatar
Friend of Wrox
Points: 16,481, Level: 55
Points: 16,481, Level: 55 Points: 16,481, Level: 55 Points: 16,481, Level: 55
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2003
Location: Clifton Park, New York, USA.
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

The number of pages that can use a master page is not limited.

Presumably the number of content place holders isn't limited either, but have lots and lots probably isn't very practical. If you found yourself with more than 3 of 4 then you might not actually want to use content placeholders because you may be trying to provide far too much flexibility in the template. Instead you could probably just use a standard page and recycle user controls for common content/controls.

-Peter
compiledthoughts.com


Similar Threads
Thread Thread Starter Forum Replies Last Post
Navigate away from a Content Placeholder slbibs SharePoint Development 0 September 4th, 2007 03:28 PM
placeholder controls rocksbhavesh ASP.NET 1.0 and 1.1 Professional 3 May 17th, 2007 08:11 AM
frustrating trouble with events and placeholder roog ASP.NET 1.0 and 1.1 Professional 0 October 13th, 2005 08:31 AM
placeholder controls -- pulling data Fubar ASP.NET 1.0 and 1.1 Professional 6 September 8th, 2005 09:08 AM
Problems with placeholder and textboxes sean ASP.NET 1.0 and 1.1 Professional 0 January 13th, 2004 11:49 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.