tags:

views:

40

answers:

1

i am trying to display an image by using the < img > tag using the following code:

<img id="img" src="C:\images.jpg" />

but there is no image displayed.i am sure that the image exist and i have already tried putting \\ instead of one \ , but it is still not working.
any help?

+1  A: 

You have to use a src which is relative to your web server root, and not a path as seen from your local file system.

the tag should look something like this:

<img id="img" src="http://localhost/images/image.jpg" /> 
klausbyskov
so i can only link to images that are located within my project folder? or within wwwroot?
heni
@heni you can link to *any* image that is served by a web server.
klausbyskov