Thursday, June 15, 2006

 

Comments in a skin file

Skin files, introduced in ASP.NET 2.0, make it easier to specify an application's look and feel. Commercial developers will want to add a comment with their copyright notice, but Microsoft does not explain how to put a comment in a skin file. In his book "Programming ASP.NET 2.0 Core Reference," Dino Esposito shows skin file content with an HTML comment, but that will cause a build failure in the release version of Visual Studio 2005.

Although a skin file looks like .aspx markup, it is highly restricted. However, it does recognize ASP code blocks and will accept code block comments, such as this example:

< %-- Copyright 2006 XYZ Corp. All rights reserved. --% >

[Note: because of display limitations, characters "< " and " >" here are shown with a space after or before them.]

Comments:
Thx a lot.
This was useful :)
Gayani
 
This has stopped working again in my version of VS.NET (2010). It gives the following error.

"PATHHERE: ASP.NET runtime error: There is no build provider registered for the extension '.skin'. You can register one in the section in machine.config or web.config. Make sure is has a BuildProviderAppliesToAttribute attribute which includes the value 'Web' or 'All'."

And yes, it contains the type-o "Make sure IS has" instead of "it" has.
 
Post a Comment

Subscribe to Post Comments [Atom]





<< Home

This page is powered by Blogger. Isn't yours?

Subscribe to Posts [Atom]