Forums

ASP

This topic is locked

Dynamic Image Resizing

Posted 02 Aug 2001 23:42:58
1
has voted
02 Aug 2001 23:42:58 Jonathan Afilalo posted:
Would appreciate some help with this one... I read the dynamically resize an image article at www.4guysfromrolla.com/webtech/011201-1.shtml but for some reason the code does not work with my page!

my image src is equal to:
"<\%=(ResultsRecordset.Fields.Item("Image".Value)%>"
where the image paths are in the field "Image" in my database (i added the backslash just for the post).

I suspect that the code might not work because the images that I want to resize are not on my server, they are being referenced from another website.

Thanks in advance,
Jonathan

Replies

Replied 07 Aug 2001 00:12:33
07 Aug 2001 00:12:33 Marcos C Lopes replied:
HI J.

I think you are right about the images not being on the server where the code will run I believe you are using the code below,

<%'=ImageResize(Server.MapPath("../Images/" & strImageName), 100, 100)%>

The Server.MapPath will return the full path starting from the server hard drive and try to add "../Images/strImageName" to it.



Reply to this topic