image objects and virtual directories

T

tshad

I have a virtual directory:

localhost/interez

And a file

localhost/interez/test/cp.aspx

I have an image in my localhost/interez/images folder (icon.gif)

The file displays fine if I do:

<img src="~/images/icon.gif" border="0" width="16" height="16"
runat=server/>

and

<img src="../images/icon.gif" border="0" width="16" height="16"/>

But not:

<img src="/images/icon.gif" border="0" width="16" height="16"/>

I want to be able to access the icon from the root folder which is "interez"
(Virtual Directory)

Do I need to use runat=server to access it directly from the root?

Thanks,

Tom
 
G

Guest

<img src="/images/icon.gif" border="0" width="16" height="16"/>

u need to give fully qualified path from the root since its not a server
control

<img src="../images/icon.gif" border="0" width="16" height="16"/>

U dont need to put runat=server attribute to display picture.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,015
Latest member
AmbrosePal

Latest Threads

Top