Thursday, January 19, 2006

CodeProject: Server-side handling for css and js

This post on CodeProject talks about creating a custom handler for css and js files, so that relative paths can be resolved. The ability to specify relative paths to your application root is clearly an advantage if your application root is a virtual directory or sub-folder from the web root. But I think this solution could go one further: II6 supports wildcard mapping, so that all requests can be funelled through the asp.net runtime, an advantage if you want to use virtual URLs for both folders and files. I believe that dotText is using wildcard mapping in this manner, and I think they have implemented a very decent handler for static files, such as js, css, images, etc. I wonder if the dotText controls can be extended to support this type of ~ (AppDomainAppVirtualPath) mapping.

submit to reddit

0 comments: