Solved

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

Posted on 2013-06-27
1
448 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Convert GUI app into console app for Win32 Env 5 125
Sharepoint 2013 Library List View Limitations 9 74
Claiming a Domain Name 7 67
SharePoint 2013 URL Duplication Issue 5 52
User Beware!  This is a rather permanent solution to removing your email from an exchange server.  The only way to truly go back is to have your exchange administrator restore your mailbox from backups.  This is usually the option of last resort.  A…
Article by: Leon
Software Metering within our group of companies has always been an afterthought until auditing of software and licensing became a pain point. Orchestrator and SCCM metering gave us the answer and it was an exciting process.
Viewers will learn how to maximize accessibility options in an Excel workbook for users with accessibility issues.
The viewer will learn how to simulate a series of sales calls dependent on a single skill level and learn how to simulate a series of sales calls dependent on two skill levels. Simulating Independent Sales Calls: Enter .75 into cell C2 – “skill leve…

730 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