Ahsan Ul Haq Ahsan Ul Haq - 3 months ago 9
ASP.NET (C#) Question

Image Display Error

<div class="result">
<img src="@imagePath" alt="image" />
</div>


I want to add an image by providing the link to the image
@imagePath
. It provides the path
images\IMG_20150507_153730.JPG


On the display image tag i get always image thumbnail with text image. Because of
alt="image


The Folder that contains the Images are in the parent folder. Images folder contain the images that presents in the same directory where the file of code is.

Hierarchy of folders

Project Location -
C:\Users\ahsan\Documents\Visual Studio 2015\WebSites\taskCOMSATS


Code file Location -
C:\Users\ahsan\Documents\Visual Studio 2015\WebSites\taskCOMSATS\upload_image


Images Folder Location -
C:\Users\ahsan\Documents\Visual Studio 2015\WebSites\taskCOMSATS\images\IMG_20150507_153730.JPG

Answer
..\images\IMG_20150507_153730.JPG