CodeVerge.Net Beta


   Explore    Item Entry   Register  Login  
Microsoft News
Asp.Net Forums
IBM Software
Borland Forums
Adobe Forums
Novell Forums




Can Reply:  No Members Can Edit: No Online: Yes
Zone: > NEWSGROUP > Asp.Net Forum > general_asp.net.master_pages_themes_and_navigation_controls Tags:
Item Type: NewsGroup Date Entered: 8/14/2007 8:45:15 AM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
NR
XPoints: N/A Replies: 1 Views: 28 Favorited: 0 Favorite
2 Items, 1 Pages 1 |< << Go >> >|
ASPMatters
Asp.Net User
Multiple Content8/14/2007 8:45:15 AM

0

Hello.

I'm having a difficult time in figuring out how to support two different master page files which have different number of ContentPlaceHolder controls from a single .aspx. My problem is as follows:

I have 3Col.master
1    <!-- -->
2    <asp:ContentPlaceHolder ID="area1"></asp:ContentPlaceHolder>
3 <asp:ContentPlaceHolder ID="area2"></asp:ContentPlaceHolder>
4 <asp:ContentPlaceHolder ID="area3"></asp:ContentPlaceHolder>
5 <!-- -->
and, 3Col.aspx
1    <!-- -->
2    <asp:Content ID="Content1" ContentPlaceHolderID="area1"></content>
3 <asp:Content ID="Content2" ContentPlaceHolderID="area2"></content>
4 <asp:Content ID="Content3" ContentPlaceHolderID="area3"></content>
5 <!-- -->
to display a 3-column view, and similarly, 2Col.master
1    <!-- -->
2    <asp:ContentPlaceHolder ID="area1"></asp:ContentPlaceHolder>
3 <asp:ContentPlaceHolder ID="area2"></asp:ContentPlaceHolder>
4 <!-- -->
and, 2Col.aspx
1    <!-- -->
2    <asp:Content ID="Content1" ContentPlaceHolderID="area1"></content>
3 <asp:Content ID="Content2" ContentPlaceHolderID="area2"></content>
4 <!-- -->
to display a 2-column view.

I would like to be able to use both 3Col.master and 2Col.master from a single Combined.aspx.

I would like to use the first one for home page and the latter for other content pages. What I cannot achieve is that I cannot use both master pages from a single .aspx as number of Content controls within the proposed Combined.aspx control hierarchy do not necessarily match that of ContentPlaceHolder controls in .master.

Say, I'd like to use 2Col.master for combined.aspx (which should have 3 Content controls as I cannot add them at runtime), and this would prevent ASP.NET from rendering the third content placeholder and cause it to throw an exception.

What shall I do?

Thanks in advance.
MatsL
Asp.Net User
Re: Multiple Content8/14/2007 12:17:06 PM

0

You could add the Content controls during the PreInit event, then you can also set the MasterPages dynamically.

Then you could check which masterpage that is being used and add the correct number of content controls.

Found this link btw, that describes how to do it in detail:
http://www.codeproject.com/useritems/dynamicmaster.asp


Mertil Interaktion
http://www.mertil.se

Be a part of the Community Recognition Program. Click "Mark as Answer" on the post that answered your question. This gives you points and rewards the person who helped you as well.
2 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
Aligning Score Scales for Achievement Tests in Multiple Content Areas Authors: Linda L. Cook, Daniel R. Eignor, Elizabeth B. Burton, Pages: 0, Published: 1990
Understanding Language Understanding Computational Models of Reading: Computational Models of Reading Authors: Ashwin Ram, Kenneth Moorman, Pages: 499, Published: 1999
Desktop Encyclopedia of Telecommunications Authors: Nathan J. Muller, Pages: 1250, Published: 2002
Microsoft SharePoint 2007 For Dummies Authors: Vanessa L. Williams, Pages: 438, Published: 2007
Beating the CSET! Methods, Strategies, and Multiple Subjects Content for Beating the California Subject Examinations for Teachers (Subtests I-III): Methods, Strategies, and Multiple Subjects Content for Beating California Subject Examinations for Teachers (subtests I-III) Authors: Chris Nicholas Boosalis, Pages: 543, Published: 2005
Multiple Voices, Multiple Texts: Reading in the Secondary Content Areas Authors: Reade W. Dornan, Lois Matz Rosen, Marilyn Wilson, Pages: 272, Published: 1997
Information Architecture for the World Wide Web: Designing Large-Scale Web Sites Authors: Louis Rosenfeld, Peter Morville, Pages: 461, Published: 2002
Apache: The Definitive Guide Authors: Ben Laurie, Peter Laurie, Pages: 568, Published: 2003

Web:
Multiple Content Types - Salesforce Features - Successforce.com Some companies want a more hierarchical, structured content categorization system to supplement the tag-based model. With custom fields and multiple content ...
MOSS2007 – Content Query Web Part (Multiple Content Types) [09/09/2007] MOSS2007 – Content Query Web Part (Multiple Content Types). Categories: Development, Office System 2007, SharePoint ...
Working with Multiple Content Sources in GoLive | O'Reilly Media With some editing and using nested loops, you can manipulate data from multiple content sources for your GoLive sites. Derry Thompson shows you how.
Turn on support for multiple content types in a list or library ... Before list managers can add different content types to a particular list or library, you must turn on support for multiple content types on that particular ...
Nuke Forums :: View topic - Multiple Content Modules I want to have multiple content modules, all with thier own admin page. I saw a post a few weeks ago regarding how to do this, ...
MultipleContentSections - opensocial-resources - Google Code - How ... Re: A question regarding multiple content With that in mind, my question is this: how did entry content evolve to its current multiple content state given the results of said poll? ...
Authoring Tools and Device Independence - slide "Multiple content ... Multiple content languages / types. ATAG can be applied to tools for authoring:. HTML; XML and XSLT; RDF and other metadata authoring; Proprietary formats ...
XNA - XNA Game Studio 3.0 Beta - Multiple Content Projects and ... Oct 10, 2008 ... In this article Aaron goes over the new features related to having multiple content projects in your XNA games as well as how you can have ...
Multiple Content Project - XNA Community Forums If you have multiple projects building content to the same output folder, you need to watch out for name collisions. If you use different directories, ...

Videos:
RePromotion Power2Show Media Player Demo RePromotion P2S Power2Show - Seamless multiple content (audio, video, website, word, excel, html, presentation slides, scrolling text) rich media ...
Circle Environmental, Inc. Video. All content is protected by ... The Circle Environmental Video briefly, not inclusively, explains how the Patented Circle Environmental Absorbent Recycling & Reuse program ...
CityWall Hki CityWall is a large multi-touch display installed in central down town Helsinki which acts as a collaborative and playful interface for its urban ...
Demo 07: Mobio Mobile Platform and Consumer Applications Mobio creates Mobio 2.0 mash-up applications that act as if they know the user. Mobio's platform enables partners to rapidly create new ...
Web Content Management (CMS) for Online Marketing Marketer and Executives can deliver exceptional, results-driven web experiences with Sitecore website content management system. Deliver the ...
Add & Publish Content in Ten Minutes to Multiple Sites Add & Publish Content in Ten Minutes to Multiple Sites
Realogrish.com / Businessman Stabs a Drunken Bum Multiple ... Reality,Ogrish ve Korku,otopsi,kafakesme,www.ogrish.com,video,korku,kürtaj,ilginç,ogrishforum,ogrişh,video,ogrih En Aykırı Türk Sitesi,ogrish ...
Earth excavator cat acts Tunnelbaustelle Ergolztal Liestal Baselland
3.3.4 – Event Marketing – Content Sharing http://www.EventsListed.info brings you the Event Marketing – Content Sharing. One way to spread the word about your event page, is to be actively ...
Visualcasting of 4K content (2006) This video is a demo showing multiple 4K content streams replicated and broadcasted in real-time over wide area 20 Gigabit networks shown ...












menu item text below imageurl.

how do i access functions on a basepage from a masterpage?

tree view control

accessing controls in content area

skin controls in .net 2.0

inaming & postbackurl

master pages and navigation

help needed: changing skinid in gridview corresponded to bound data.

background with masterpages

navigation in master page - is it a good idea?

menu with levelmenuitemstyles

registration page.

losing master pages?

colouring web.sitemap

performance issues with menu control

button event using master page and rewriter module doesnt work

masterpage error: make sure that the class defined in this code file matches the 'inherits' attribute, and that it extends the correct base class (e.g. page or usercontrol).

multiple sitemap file issue

working with master pages - what about sitemaps, etc

css style not applied

use of theme skins?

problem with master pages

securitytrimmingenabled in templated solution

external pages with master pages

master page will not allow request.form values to return data

css styles not applied until one logs in.

new sitemap providers in wss3

error with preinit for masterpage (vb)

how to indicate separator in "site map"

updating a variable on a master page from the asp:content holder sub page.

 
Search This Site:

 
  Privacy | Contact Us
All Times Are GMT