Getting design time rendering of ASP.NET Themes in Expression Web

MikeO on my team asked me what was Expression Web's support for ASP.NET Themes - a great bit of functionality in ASP.NET 2.0 which allows developers to dictate the appearance of controls in a web application using template files with a .skin extension and also using style sheets. I didn't know the answer, so off I toddled to the product manager in Corp, Wayne Smith, who quickly came back with the solution.

So, to test this out I downloaded an ASP.NET Starter Kit from www.asp.net such as the Personal Web Site starter kit which includes ASP.NET Themes in the solution. I installed the project template and created a sample personal web site to see what Expression Web did out of the box with Themes - not much was the answer and I didn't know why:

 

no_aspnet_themes

 

As you can see above - there is no style being applied to the .master page. This is where Wayne and subsequent searching on the web found the solution. To get design time rendering it is *really* simple, just add the following line to your web.config file (the pageBaseType isn't necessary):

 <pages pageBaseType="PageBase" styleSheetTheme="Red" />

And as a result you get this:

aspnet_themes_design

I am assuming that this should also work in Visual Studio but haven't investigated.

MJ

 

tags: asp.net, expression web, themes