Need To Output and Image From a URL

  • Thread starter Thread starter rh1200la
  • Start date Start date
R

rh1200la

Hey all. I need to output an image via an .aspx page and hope someone
here can help.

I would like to display an image like this:

<img src="displayImage.aspx?categoryID=1">

The .aspx page will grab a random URL from the database based on the
category id.
I would like the script to load the URL and download the image, and
then have the output be of content type image/gif.

Is there a simple way to do this? I'm not sure if I can use the
XMLHTTP object due to firewall settings on our server, but I'm not 100%
sure on this.

thanks.

-RH
 
Close except my database table will hold the external url of an image
that lives on other servers, so the data type will be a varchar, not
binary.

In your first link there's this:
-System.Drawing.Image.FromFile(Server.MapPath(imageUrl))

which loads the image from the server. i don't think this would work
for me.

thanks.
 
Back
Top