image url question

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

hey all,
i'm doing the "use an aspx page for ImageUrl" trick and ran into wall. i
need to take an existing image that resides in the application root in a
folder called, none other than, images and make that show up.

Could someone please help me with the syntax? Also, if i could be doing this
an easier way please let me know.

thanks,
rodchar
 
rodchar said:
hey all,
i'm doing the "use an aspx page for ImageUrl" trick and ran into wall. i
need to take an existing image that resides in the application root in a
folder called, none other than, images and make that show up.

Could someone please help me with the syntax? Also, if i could be doing this
an easier way please let me know.

thanks,
rodchar

For a PNG image:

Response.ContentType = "image/png";
Response.WriteFile(Server.MapPath("images/SomeImage.png"));

For other image formats, use a different content type.
 
Back
Top