Solved

How to display image in image control from folder located outside of application

Posted on 2013-06-27
1
444 Views
Last Modified: 2013-07-09
I have a project using ASP.net and Visual Studio. I want to display an image using image control. However the image(s) are outside of the visual studio project. I have setup a virtual directory and used that as my image1.imageurl property. It worked the first time I tried it but I deleted the original.aspx I created and started a fresh one and now it doesn't work.

virtual directory  Alias = collateral
I enabled browsing on the virtual directory

ASP.net page with image control.
image1.Imageurl = collateral/penguins.jpg
penguins.jpg is there
I have also tried /collateral/penguins.jpg as well but no luck.

Any help or alternatives would be appreciated.
0
Comment
Question by:laskydiver
1 Comment
 
LVL 44

Accepted Solution

by:
AndyAinscow earned 500 total points
ID: 39285404
Does this work - this assumes the current directory contains the other directory and image
image1.Imageurl = ./collateral/penguins.jpg


(If it doesn't then you may want to display a message box or similar with the current path - maybe it isn't what you assume it is).
0

Featured Post

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Preface There are many applications where some computing systems need have their system clocks running synchronized within a small margin and eventually need to be in sync with the global time. There are different solutions for this, i.e. the W3…
The new Microsoft OS looks great, is easier than ever to upgrade to, it is even free.  So what's the catch?  If you don't change the privacy settings, Microsoft will, in accordance with the (EULA) you clicked okay to without reading, collect all the…
Viewers will learn the different options available in the Backstage view in Excel 2013.
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question