by Tim
23. February 2011 19:30
I'm building an ASP.NET 3.5 site that has the Theme set in the web.config file:
<pages theme="Sepia">
Recently, I've been working on a page that produces a syndication feed. For this particular ASPX page I don't want any HTML as the page will be rendered by the browser as ATOM/RSS, and in any case, an error will be raised by IE (though not Firefox). The problem is that when I remove any HTML, I get the following error:
Using themed css files requires a header control on the page. (e.g. <head runat="server" />).
The answer to the problem is not just to set the EnableTheming="false" in the page directive, but to set the Theme="". It should really be that disabling Theming should be enough but setting the theme to also be an empty string seems like a Microsoft bug.
Maybe time will tell?