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

Forum statistics

Threads
473,981
Messages
2,570,188
Members
46,731
Latest member
MarcyGipso

Latest Threads

Top