absolute path to ImageUrl property .....

A

Adam Right

Hi All,

I'm developping a site using VS2008 (c#) on IIS 6.0.
In my application images are not shown by the image control, they are in the
web server machine and the main folder path is E:\PICTURES.

If I set the ImageURL property in the code and set it to the absolute path
of the image, it doesn't show.

Is it possible to set ImageUrl property for absolute path of a image file,
like that...

Image1.ImageUrl = E:\PICTURES\products\st750-4.png

Any tips?

Thanks.

Adam...
 
P

Patrice

Keep in mind that the location of the image is used client side in your
browser. Your browser won't be able to get an image that is stored outside
of your web site on your web server harddrive (my understanding is that the
E:\PICTURES location is not under your web site).

You could use a handler or an ASPX page that will read the content of this
file server side to stream this content to the browser...

Try for example :
http://msdn.microsoft.com/msdnmag/issues/04/04/CuttingEdge/

If making those images not reachable is not what you intended (or if I
misunderstood the situation) you could just create a virtual folder to this
location and then use ~/myfolder/products/whatever.png) so that they are
available using a particular URL...
 

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

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top