Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

User controls

Status
Not open for further replies.

primagic

IS-IT--Management
Jul 24, 2008
476
GB
I have a usercontrol located in the root directory and I am referencing it from a page in a subfolder.

The user control seems to display correctly however the images within the user control are not displaying.

The images are display in the control as:

Code:
<img src="images/logo.jpg"

Images being a subfolder of the root directory also

If I try to use a tilde ~ as:

Code:
<img src="~/images/logo.jpg"

This doesnt work.

Do I need to add an images folder into the subfolder as well
 
if you make the img a server side control, (runat="server" id="imageName"), the tilde should then operate as expected.

Rhys

"Technological progress is like an axe in the hands of a pathological criminal"
"Two things are infinite: the universe and human stupidity; and I'm not sure about the the universe"
Albert Einstein
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top