Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
ASP.NET 2.0 Professional If you are an experienced ASP.NET programmer, this is the forum for your 2.0 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 Professional 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 January 11th, 2006, 07:38 PM
Authorized User
 
Join Date: Jul 2003
Location: , , .
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Default Dynamicaly Theming Master Pages

It's possible to dynamically asign themes .aspx files through the Page_PreInit command, however i want to dynamically assign a theme to a master page, and master pages don't seam to support Page_PreInit event, how do i add a theme dynamically to a master page?
  #2 (permalink)  
Old January 18th, 2006, 11:04 PM
Registered User
 
Join Date: Jan 2006
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I'm also searching for an answer to this since I want to do the same thing. I haven't implemented it yet, but I'm going to try using the following logic: create a number of master pages each matching a theme. Then I'm going to try to put the theme name and the master page name into a variable that's stored in the database which can be retrieved from the database before the page renders.

I'm coming from PHP, and I know I can do this there, so hopefully I can do it with ASP.NET. I'm just learning ASP.NET 2.0, so I have more "logic" than applicable programming skill right now.
  #3 (permalink)  
Old January 18th, 2006, 11:06 PM
Authorized User
 
Join Date: Jul 2003
Location: , , .
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Default

have a look at http://staff.develop.com/ballen/blog...ate=2005-01-01 this is apparently to do with the fact master pages are not actually "pages" but are inherited of user controls... or something stupid like that



Similar Threads
Thread Thread Starter Forum Replies Last Post
Master Pages Jayahar ASP.NET 3.5 Basics 1 September 2nd, 2008 04:20 PM
Master Pages, Content Pages and CSS carliviris Visual Studio 2005 0 January 8th, 2008 05:56 PM
Master pages wunnavabk ASP.NET 2.0 Professional 1 June 25th, 2007 07:09 AM
how to add css to master pages? shaileshcdac Classic ASP Basics 0 April 5th, 2007 04:01 AM
detail-master pages katie456 Classic ASP Databases 1 June 13th, 2003 04:16 AM





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