PC Review


Reply
Thread Tools Rate Thread

absolute path to ImageUrl property .....

 
 
Adam Right
Guest
Posts: n/a
 
      28th Jan 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
 
      28th Jan 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:(E-Mail Removed)...
> 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
 
      28th Jan 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:
(E-Mail Removed)...
> 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
Rate This Thread
Rate This Thread:

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
Using the ImageUrl property of the HyperLink control Nathan Sokalski Microsoft ASP .NET 4 18th Apr 2009 12:47 AM
Resource Files, Images, And The ImageUrl Property Nathan Sokalski Microsoft Dot NET Framework 2 14th Sep 2008 09:15 PM
Resource Files, Images, And The ImageUrl Property Nathan Sokalski Microsoft ASP .NET 2 14th Sep 2008 09:15 PM
RewritePath and Hyperlink's ImageUrl property Aidy Microsoft ASP .NET 0 11th Jan 2008 11:51 AM
How to add Width and Height Property to TreeView ImageURL bruticus Microsoft ASP .NET 0 5th Oct 2007 02:57 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:23 PM.