473,840 Members | 1,447 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Disable Asp.Net 2.0 Theme at page level

I've created a theme Css for my Asp.net 2.0 web application. The web.config
Pages Theme key is set to the theme name. Everything seams to work fine
except for any page that I want to disable the master theme and apply another
stylesheet.css.

According to the documentation I've read. I should be able to disable the
theme by setting the "enablethem ing" attribute on the aspx Page to false.
This doesn't seam to work. When I look at the source of the generated page I
can see the link to the new stylesheet that I want but just prior to the body
tag I also see a reference to asp.net theme stylesheet that I'm tring to
disable.

Is this a bug? I've tried everything I know of to disable the theme at the
page level.
Apr 13 '06 #1
3 2878
Hi,

I agree that EnableTheming=" false" doesn't seem to work. Weird.
Try this instead:

protected void Page_PreInit(ob ject sender, EventArgs e)
{
Page.Theme = "";
}

HTH,

Chris

Apr 13 '06 #2
Hi,

I have the same problem, so far I've tried the following with no luck:
-Added EnableTheming=" false" to Page directive
-Added Theme="" to Page directive
-Added Page.Theme="" to Page_PreInit event

just to give you a little bit more context: I'm setting theming in
web.config using:
<pages styleSheetTheme ="White"/>
is this a bug in the framework? is there a workaround this?

Thanks,
PJ
"Chris Fulstow" wrote:
Hi,

I agree that EnableTheming=" false" doesn't seem to work. Weird.
Try this instead:

protected void Page_PreInit(ob ject sender, EventArgs e)
{
Page.Theme = "";
}

HTH,

Chris

May 27 '06 #3
Thanks Chris
Sorry for the delay but I got involved with some other issues!

Your work-around solved my problem. I had not thought about just setting
the page.Theme propery to an empty string.

I normally do not have to use Page_PreInt but for those pages I want to
override the application Theme I just use your work-around.

Its to bad the EnableTheming=" false" page directive does not work as the
documentation states.

Thanks again

"Chris Fulstow" wrote:
Hi,

I agree that EnableTheming=" false" doesn't seem to work. Weird.
Try this instead:

protected void Page_PreInit(ob ject sender, EventArgs e)
{
Page.Theme = "";
}

HTH,

Chris

May 27 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2303
by: Miguel Dias Moura | last post by:
Hello, I am creating a master page for a web site. All pages created from this master page will use the same theme. However I am not able to add the theme in my master page. Why is that? Do I need to add the theme on the top of each page I create from this master page?
0
1726
by: damiensawyer | last post by:
Hello all, I'm very new to all of this. I have a theme and a skin (the standard ones). I have a standard master page which is holding a custom ascx which has a treeview in it. Can someone please point me in the right direction to bind a theme to the treeview? The 'theme' tag is on the <%@ page %> directive... however neither my master page or ASCX files use this. They use <%Master%> and
4
3417
by: Ben | last post by:
Hi, I'm using images in my menu control. I have my menu setup based on this example: http://msdn2.microsoft.com/en-US/library/system.web.ui.webcontrols.menuitembinding.imageurlfield(VS.80).aspx I have a theme and right now, the theme structure looks like... App_Themes --Authenticated ----Images ------Menu
1
8014
by: Joey | last post by:
Hello, I have tried to programmatically set the theme for my master page by putting code in a "Page_PreInit" fuction in the master page's code behind. However, when I set a breakpoint there and run the app, the breakpoint is never hit. Of course my theme is not being applied. The above procedure works fine for any content page, but obviously doesn't work for my master page. So, how does one properly and programmatically set a theme...
0
868
by: Larry Bud | last post by:
I only saw one other post about this, and it was back in April 06, without resolution. I'm trying to disable my default theme on one page for a GridView. I've set EnableTheming to False for the GridView, AND I've set EnableTheming to False in the page directive, yet the GridView STILL comes up with the default theme. Is there a resolution to this?
11
6536
by: greg | last post by:
Hi all, Is there a way to get the current theme name at design time? I'm trying to write a custom control for which I need to use images from the current theme. I have asigned a theme to the page as well as in the web.config. The control looks ok at run time but when viewed in the Visual Studio designer it cannot pick up the current theme.
2
24578
by: jobs | last post by:
my asp.net code compiles file and renders the default.aspx page just fine from F5 in vs.net 2005. (you know with a port) However, If attempt to call the page from browser I get the error: Theme 'Theme1' cannot be found in the application or global theme directories. i have this in my web config:
1
1288
by: grexican | last post by:
Hello, I'm working with some third-party JS code, such as mootools and moo.fx, among a few others. They have some really nice "flashy" features, such as fading from one color to another to bring attention. I would like to use these settings, but I am currently restricted to a single theme (more specifically, one color scheme), because you must specify the start and stop color in JS. If I could "theme" JS files, then I could create a...
4
2293
by: =?Utf-8?B?TUNN?= | last post by:
I am trying to disable ViewState at the application level. I have the following line in my web.config: <pages enableViewState="false"></pages> But it is not working. What can I do?
0
9856
marktang
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...
0
9698
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,...
0
10916
Oralloy
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...
1
10657
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9436
agi2029
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...
0
7022
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();...
0
5872
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4495
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
2
4071
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.