image url question

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
 
G

Guest

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top