Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


ASp.net & access denied on Images folder

Posted on 2011-10-18
Medium Priority
Last Modified: 2013-11-26
Hello folks,

   Below is a snippet of coding that I have and I am having a problem with it reading the images in the images directory.
It will show mw the path correctly but when I display them, it doesn;t show the image only the old familar red X.
When I display the path with a response.write,this is what I have:

 which is correct but when I try t pop-up in a window using javascript,  it tells me "access denied"

I think this is the problem....
any help appericated....

Question by:Overthere
LVL 27

Accepted Solution

nmarun earned 2000 total points
ID: 36990696
From what I can see, you need to provide the relative path from your website and not the absolute path on your hard disk. So it'll be something like:

<img src="~/images/siteaa.jpg" />


Expert Comment

ID: 36990936

yes, if your image is in your project folder use relative path..

Featured Post

Industry Leaders: 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

Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).
Suggested Courses

564 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