Solved

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

Posted on 2013-06-27
1
447 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

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

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

This collection of functions covers all the normal rounding methods of just about any numeric value.
Configuring network clients can be a chore, especially if there are a large number of them or a lot of itinerant users.  DHCP dynamically manages this process, much to the relief of users and administrators alike!
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …

829 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