пятница, 30 апреля 2010 г.

How to: Disable ASP.NET Themes 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.

The solution is to set Theme="" on the page:

<%@ Page Language="C#" EnableTheming="false" Theme="" %>

Комментариев нет: