Hi,
I have created two themes in our application. Trying to apply themes
on fly to the entire application(all pages..) .
1. In web.config file mentioned <pages theme="theme1" />, It is
applying for the entire site.
2. In each Page, PreInit event menthod if I mention
Page.Theme = Profile.MyTheme;
It is applying the theme to which ever pages, I have declared
PreInit method with above code.
I am trying to set in one place for the entire application. Instead of
specifying in all pages.
Page_PreInit method and Page.Theme="" code.
I am using single Master page, I thought if I setup for Master page It
will apply to the entire site. But In Page_PreInit method for Master
mentioned above code. It is not working.
Can any one tell which is the better way to do this one.
Thanks
Suresh 2 2636
The master page doesn't have any PreInit event.
Make a base class where you override PreInit, then you just let all your
pages inherit that class instead of Page:
public class ThemedPage : Page {
// override PreInit here
} su***********@gmail.com wrote: Hi, I have created two themes in our application. Trying to apply themes on fly to the entire application(all pages..) .
1. In web.config file mentioned <pages theme="theme1" />, It is applying for the entire site. 2. In each Page, PreInit event menthod if I mention Page.Theme = Profile.MyTheme; It is applying the theme to which ever pages, I have declared PreInit method with above code.
I am trying to set in one place for the entire application. Instead of specifying in all pages. Page_PreInit method and Page.Theme="" code.
I am using single Master page, I thought if I setup for Master page It will apply to the entire site. But In Page_PreInit method for Master mentioned above code. It is not working.
Can any one tell which is the better way to do this one.
Thanks Suresh
Yes, that's how its usually done. And then you need to write a bunch of code
to maintain the selection across sessions :-)
<%= Clinton Gallagher
NET csgallagher AT metromilwaukee.com
URL http://www.metromilwaukee.com/clintongallagher/
"Göran Andersson" <gu***@guffa.com> wrote in message
news:eU**************@TK2MSFTNGP04.phx.gbl... The master page doesn't have any PreInit event.
Make a base class where you override PreInit, then you just let all your pages inherit that class instead of Page:
public class ThemedPage : Page { // override PreInit here } su***********@gmail.com wrote: Hi, I have created two themes in our application. Trying to apply themes on fly to the entire application(all pages..) .
1. In web.config file mentioned <pages theme="theme1" />, It is applying for the entire site. 2. In each Page, PreInit event menthod if I mention Page.Theme = Profile.MyTheme; It is applying the theme to which ever pages, I have declared PreInit method with above code.
I am trying to set in one place for the entire application. Instead of specifying in all pages. Page_PreInit method and Page.Theme="" code.
I am using single Master page, I thought if I setup for Master page It will apply to the entire site. But In Page_PreInit method for Master mentioned above code. It is not working.
Can any one tell which is the better way to do this one.
Thanks Suresh This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: clintonG |
last post by:
Does anybody know how to use a control such as the DropDownList to change
Themes when using MasterPages?
I'm also asking in the forum.
<%= Clinton Gallagher
METROmilwaukee (sm) "A Regional...
|
by: Ryan Ternier |
last post by:
I have just started playing around with ASP.NET 2.0 and have a few questions
I couldn't get answers to on the net.
If anyone could help me with these it'd be awesome.
---
Themes - THey seem to...
|
by: Michael |
last post by:
Hello,
I'm starting to use Themes. I skin some Web controls, like a WebPart and a
CatalogPart. While browsing my Web page, I can see that the Theme is
working, in VS 2005, in design view, I...
|
by: Full Decent |
last post by:
Hey again!
In my quest to make proper use of OO PHP I would like to ask for a
critique of the current method of doing themes in the Camera Life
(http://fdcl.sf.net) software and see if an OO...
|
by: Seefor |
last post by:
I may be missing something, but why aren't master pages part of themes?
i.e. why don't they go in the App_Themes or global Themes directory, and be
referenced just by name (not full path) in the...
| |
by: Sean |
last post by:
My experience now working with master pages on and off for 6 months is that
they can be very dangerous when working with themes.
One example in particular is the changes I made to my banner menu...
|
by: Clinton Farleigh |
last post by:
Hi,
I was going to ask a question, but I think I've answered it so now I am
going to rant about how crappy ASP.NET themes are instead.
As I've indicated above, my problem today is with themes....
|
by: New Bee |
last post by:
Hi,
I have been looking at Themes and Skins today and now resonably understand
how they work at a ground level. But I have a couple of questions.
1. ) StyleSheetTheme
I dont understand...
|
by: mike |
last post by:
Hi. I am having trouble grasping the concept of applying a consistent
theme to an ASP.net website. I didn't used to like ASP because it was
too hard to apply a theme from a common theme folder like...
|
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,...
|
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,...
| |
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...
|
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...
|
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,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |