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 2645
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***********@g mail.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.co m> wrote in message
news:eU******** ******@TK2MSFTN GP04.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***********@g mail.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 Information Service"
NET csgallagher AT metromilwaukee.com
URL http://metromilwaukee.com/
URL http://clintongallagher.metromilwaukee.com/
|
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 lack full functionality with CSS files.
I have a theme set up. Inside that theme I can have 32 CSS files. Each file
is for each page within that theme. Why? I find it easier having multiple
small CSS files to work with rather than a few HUGE...
|
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 don't see the Theme styles being
applied. Neither are the properties reflected in the Properties window.
Am I doing something wrong? Should the skin properties be reflected in the
Properties Window and in the Design view. I do hope so, because...
|
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 approach is more
appropriate. This program consists of multiple PHP pages that include a
common.php file. My motivation is to make making themes easier, so we
can get more theme contributors!
Themes consist of image files, a css file and a PHP...
|
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 declaration for a page?
That way, you can change the complete layout by just applying the theme to a
page or a whole site.
I know that if your master pages are XHTML, then you can change the layout
significantly with CSS, but there are...
| |
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 which now
work just fine with all my themes on my development machine but on my
production server my non-standard themes are showing effects that are no
longer in place even with a complete re-copy of my project.
Problems like this with...
|
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. Per
microsoft "Only one theme can be applied to each page. You cannot apply
multiple themes to a page, unlike style sheets where multiple style
sheets can be applied."
|
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 where this would be used. As I understand it the
precidence is like this.
|
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 I could do
easily in PHP, but now I see that it has some nicer theming features
and master files.
So I want to use web.config to switch which theme I'm using, and I
want to be able to have several themes. My understanding of themes is
that I...
|
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...
|
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,...
| |
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...
|
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...
|
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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 we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |