By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,402 Members | 1,700 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,402 IT Pros & Developers. It's quick & easy.

Set a separator image for a SiteMapPath (skin)

P: n/a
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.

Apr 12 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Mark your <img> with runat=server

-Brock
http://staff.develop.com/ballen

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.

Apr 12 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.