473,396 Members | 2,052 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Set a separator image for a SiteMapPath (skin)

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
1 4508
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

21
by: Dan V. | last post by:
I have tried a number of things including preloading, but the background image (water tile in header) in IE 6 will not display where other browsers will....
17
by: Alan Silver | last post by:
Hello, I have a page which I am converting to use themes. The page has an HTML <input type="image"> element that is used to post to another page. I would like to replace this with a server...
5
by: Jon via DotNetMonster.com | last post by:
Hi all, I'm using the ASP.NET sitemappath control and the ASP.NET menu control This sitemappath control works and shows the path when the page doesn't have an anchor - for example: ...
0
by: news.sbcglobal.net | last post by:
Hi. I was wondering if someone could tell me how to set SiteMapPath control styles in a .skin file. I've tried this (see below) but it doesn't work: <asp:SiteMapPath runat="server"...
3
by: Uriah Piddle | last post by:
Hi Gang, I have a SiteMapPath, bound to a Site Map, that traces a hierarchy down to an 'Article' leaf node. But the Article page shows one of many individual articles depending on which article...
2
by: CK | last post by:
Hello All, I am trying to extend the default asp:ImageButton to include an image for an enabled state and a second image for a disabled state. I currently did this by extending the ImageButton...
1
by: Alec MacLean | last post by:
Hi. I'm using VS2005 Pro to work on a website project for my company. The site has several navigation elements, all based on the standard VS2005 navigation components. I have high-level...
2
by: =?Utf-8?B?SmFtZXMgUGFnZQ==?= | last post by:
I’m trying to create a dynamic asp.net 2.0 siteMapPath control (using VB.net). Using the xml sitemap I’ve got these three pages: productGroup.aspx productListing.aspx productDetail.aspx ...
4
by: lionel luo | last post by:
how to find where is the imagelogo? Please advice.Thansk. Code:---------------------------------------------------- private Image __BuildControlImageLogo () { Image image1 = new Image ();...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.