Skip to content Skip to sidebar Skip to footer

Adding Image In Html

I cannot seem to add an image in html. I'm using ASP.net MVC 3. My image, named KeyLargoPic, is located on a flash drive in the folder X:\Project\Project\Photos\Key Largo, and it

Solution 1:

Upload the image to your web server and reference via web path from your project. The web server can't read from your usb drive.

Solution 2:

Try to mount a virtual directory in IIS pointing to X:\Project[...] so you will be able to access your ressources with a relative address

Solution 3:

Add the image to your project, probably in the content directory, by right clicking the directory and clicking "Add" then "Existing Item", browse to your jpeg and click "Add". With your image now part of the project you can add it to the webpage like so:

<td><imgsrc="@Url.Content("~/Content/KeyLargoPic.jpg")" alt="IMAGE"></td>

Post a Comment for "Adding Image In Html"