Set Extension For Handler.ashx

420 views Asked by At

I have a generic handler Image.ashx that crops/resizes images on the fly by reading information from the querystring like Image.ashx?filename=foo.jpg&maxwidth=200&maxheight=300.

Is there a way that I can change the extension of this handler to .jpg? (it always returns jpgs) I'd rather the calls look like this: Image.JPG?filename=foo.jpg&maxwidth=200&maxheight=300?

1

There are 1 answers

0
Darren Kopp On BEST ANSWER

Yes, you can use the routing infrastructure to point image.jpg to image.ashx