[RESOLVED]Bind Image From Physical path outside web directory to Datalist

Hi ,

I am trying to bind a image which is located outside web directory so clients do not have access to resource file to asp Image in datalist control but images are not displayed as it is located other drive phiscal location  and it is manadatory for  me to
do so please suggest me a solution on this 

please find the aspx page below

If you check out the
Image class
then the main property to look out for would be
ImageURL
. This property can use both relative as well as absolute paths.

I’m not sure because I never tried this myself; but I would imagine that you should be able to point an absolute path to the image you’re trying to use.

Create virtual directory in iis to the phiscal location, then use this virtual directory to display the image seems like the files is in your application.

Hi,

Or you could use : http://www.dotnetperls.com/ashx . This way you’ll use a link such as
/image.ashx?id=name. The handler will get the image form whatever location you want and will sent it back to the browser.

 

Leave a Reply