I received an interesting error today when I tried to create a WebForm which didn’t have any content on it.
Using themed css files requires a header control on the page. (e.g. <head runat=”server” />).
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.InvalidOperationException: Using themed css files requires a header control on the page. (e.g. <head runat=”server” />).
Fair enough, I do have a Theme set in my Web.Config, so on to disable themes for the page, a la:
Run the page again, same error. What gives? Then I ran across Rick Strahl’s WebLog (specifically this: http://www.west-wind.com/WebLog/posts/4662.aspx).
The fix I ended up using was:
A bit strange the disabling theming doesn’t take care of this.