473,379 Members | 1,278 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,379 software developers and data experts.

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 "enabletheming" 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 2848
Hi,

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

protected void Page_PreInit(object 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(object 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(object 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
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? ...
0
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...
4
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 ...
1
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...
0
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...
11
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...
2
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: ...
1
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...
4
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.