I have a httphandler that is fitred for all .png files. I would to be able to rewite the name of the file into the html. Is this possible? So if test.png comes into the handler I want to write test.png?V=1
So far I have found the following:
context.Response.AddHeader("content-disposition", "inline; filename=" + context.Request.FilePath + "?V=1开发者_如何学JAVA");
Yes it's possible, although I haven't done it.
You should be able to load the imgaes into memory, and serve them from there; during this process you should be able to give the file any name you like.
This will be helpful: Image from HttpHandler won't cache in browser
This page has some info on serving images via an HttpHandler (about 2/3rds into the article): http://msdn.microsoft.com/en-us/library/ms972953.aspx
精彩评论