Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > absolute path to ImageUrl property .....

Reply
Thread Tools

absolute path to ImageUrl property .....

 
 
Adam Right
Guest
Posts: n/a
 
      01-28-2008
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...



 
Reply With Quote
 
 
 
 
Eliyahu Goldin
Guest
Posts: n/a
 
      01-28-2008
It must be a virtual path. In other words, relative to the application web
directory, like Images/myImage.gif

--
Eliyahu Goldin,
Software Developer
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net


"Adam Right" <AdamRight> wrote in message
news:...
> 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...
>
>
>



 
Reply With Quote
 
 
 
 
Patrice
Guest
Posts: n/a
 
      01-28-2008
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/is...4/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...

--
Patrice


"Adam Right" <AdamRight> a écrit dans le message de news:
...
> 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...
>
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How does one get an absolute absolute file path? James Byrne Ruby 3 09-14-2010 06:02 PM
absolute path to ImageUrl property ..... Adam Right ASP .Net Web Controls 1 01-28-2008 02:03 PM
Absolute path in Manifest Class-Path header? bo_kid@yahoo.com Java 10 05-30-2005 01:43 PM
absolute path versus relative path in JSP Matt Java 3 07-08-2004 08:31 PM
Make a relative url path from an absolute path to another one Thomas Guettler Python 3 10-27-2003 04:41 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57