broken image problem



hi 3.5

In a Web User Control I have this image tag:
<img src="Images/normal.gif" name="link2" border="0" />

This image tag works great when the Web User Control is used on pages on the
root folder, like Default.aspx..
But when .aspx is at a subfolder (like ~/Pages/) then it displays broken
image icon for this image...

(the Web User Controls are in the Control folder, ~/Controls/)

what should I do to fix this problem?



William Niver


<img src="~/Images/normal.gif" name="link2" border="0" runat="server" />

Since it's now a server control, the ~/ will evaluate to your root directory
no matter what directory yer in.

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