C
Christopher Ambler
I'm wondering if there's a solution here -
I have an ASPX page with a sole purpose of scaling an image. The ASPX page
contains a single line with the codebehind tag, and the .cs file contains
the code to read an image, use GDI+ to scale it to a reasonable size, and
emit the image directly (setting content-type on the response and spitting
out the bytes for the image).
What I'd love to do would be to eliminate the ASPX page and be able to call
a routine in my compiled code directly. Since this code will be delivered to
a customer, that would get rid of the extra ASPX page and make it much more
elegant.
But since the ASPX page is called in an "img" tag, I can't see a way to do
this. Obviously, I need the img tag in the display file, but is there a way
to specify that the content comes from code rather than another page? Can
the img tag be runat-server and inject the image directly in codebehind?
Anyone have a clue for me?
Many thanks!
Christopher
I have an ASPX page with a sole purpose of scaling an image. The ASPX page
contains a single line with the codebehind tag, and the .cs file contains
the code to read an image, use GDI+ to scale it to a reasonable size, and
emit the image directly (setting content-type on the response and spitting
out the bytes for the image).
What I'd love to do would be to eliminate the ASPX page and be able to call
a routine in my compiled code directly. Since this code will be delivered to
a customer, that would get rid of the extra ASPX page and make it much more
elegant.
But since the ASPX page is called in an "img" tag, I can't see a way to do
this. Obviously, I need the img tag in the display file, but is there a way
to specify that the content comes from code rather than another page? Can
the img tag be runat-server and inject the image directly in codebehind?
Anyone have a clue for me?
Many thanks!
Christopher