Display pretty file icons in your ASP.NET applications with IconHandler

Posted: Jan 11, 2007  2 comments

Average Rating

Tags
ASP.NET
development
IIS News Item
IIS7
Do you like file icons? I do. They make it pretty easy to visually digest file lists in Windows, when you open a file system folder with explorer.

Displaying icons in your web application can also be pretty compelling (for example, to spruce up that boring directory listing page, or visually represent documents in your web app). Wouldn't it be cool if you can write an ASP.NET control or page that can embed these icons on your custom directory listing view?

Unfortinately, there is no easy way to get icons for files in the .NET framework, so you have to do a little interop with the Windows shell to get the icon for a file / file extension, and then figure out a way to serve it over the web as an image. So, I wrote an ASP.NET image handler that serves the icon for an aritrary file or extension, that you can simply drop into your application to get these pretty icons for whatever purposes you need.

Read more on http://mvolo.com/blogs/serverside/archive/2007/01/11/Display-pretty-file-icons-in-your-ASP.NET-applications-with-IconHandler.aspx.

Comments

  1. MVolo's Blog : Display pretty file icons in your ASP.NET applications with IconHandler
    January 11, 2007

    PingBack from http://blogs.iis.net/mvolo/archive/2007/01/11/display-pretty-file-icons-in-your-asp-net-applications-with-iconhandler.aspx

  2. CoqBlog
    January 13, 2007

    Je viens de voir un post de Mike Volodarsky dans lequel il nous parle de IconHandler , un handler qui

Page view counter