Set a separator image for a SiteMapPath (skin)

J

Jules

In a ASP.NET 2.0 project I'd like to set an image as path separator in
the SiteMapPath. When I edit the PathSepartor template (for this
SiteMapPath) and drag an image on it, it works fine for all pages in
the root of the Web project. VS2005 creates the folling aspx:

<asp:SiteMapPath ID="SiteMapPath" runat="server">
<PathSeparatorTemplate>
<img src="Images/arrow-right.jpg" />
</PathSeparatorTemplate>
</asp:SiteMapPath>

However, this project also has pages in subfolders. For all pages in
these subfolers this images reference doesn't work anymore (logical
behavirour). So I changed the img src to "~/Images/arrow-right.jpg" as
shown below:

<asp:SiteMapPath ID="SiteMapPath" runat="server">
<PathSeparatorTemplate>
<img src="~/Images/arrow-right.jpg" />
</PathSeparatorTemplate>
</asp:SiteMapPath>

This results in not showing the arrow image at all. Even not in the
pages in the root of the webproject. The image properties in the
website state: "http://localhost/project/~/Images/arrow-right.jpg".
Other options I tried where "../" and "./". None of them seem to work.
Does somebody has a solution to this problem? Is it a bug?

Kind regards,

Jules

BTW: The behaviour as described above also occurs when I set this
SiteMap style in a .skin file in the App_Thems.
 

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,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top