I'm storing my images in a sql 2008 database as varbinary(max) and displaying them on my web page using an httphandler. The httphandler does the following:
context.Response.ContentType = dr("Filetype").ToString()
where Filetype is the file extension. For example, GIF, JPG, PNG, ICO.
I use the following markup to display the image:
<asp:Image ID="Image1" runat="server" ImageUrl="~/HttpHandlers/DBImageHandler.ashx?fileid=11" />
The code works fine for PNG but not for ICO. I know the web site can display ICO file extensions since I was originally storing the files on web server disk drive and displaying them normally (ImageUrl='~/images/MyIcon
Do I need a different content type than ico to display those file types?
Thanks in advance.