image objects and virtual directories

  • Thread starter Thread starter tshad
  • Start date Start date
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
 
<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.
 
Back
Top