Last post Jul 27, 2009 03:42 AM by DigiMortal
Jul 26, 2009 08:17 PM|jimioh|LINK
I am serving images using an HttpHandler, and depending on the url would like to redirect to an .aspx page that contains the style and markup (image tag) for the image.
I was initially attempting to redirect to the aspx page. But I would like to pass through parameters for the image such as height and width. (these are in the original url)
The other way I was considering doing this was using an HttpHandlerFactory and GetCompiledPageInstance, but I already am using an HttpHandler for the images and parsing of the url, so I thought using the redirect would be better
What is the bext way to do this? How can I pass information to the .aspx page if it is redirected to?(in the request?) or set variables in the compiled instance of the page if I used the HttpHandlerFactory?
c# httphander httphandlerfactory
Jul 27, 2009 03:42 AM|DigiMortal|LINK
If it is possible you may consider using HttpHandler to return images with correct size. Here is the example for SharePoint but it is easy to modify to fit your needs
SharePoint: Creating HttpHandler for user profile images. If you want to redirect internally you can use HttpContext.Current.Rewrite() method by example. You can give there also query string parameters for the page you redirect the request.