473,804 Members | 3,894 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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:SiteMapPat h ID="SiteMapPath " runat="server">
<PathSeparatorT emplate>
<img src="Images/arrow-right.jpg" />
</PathSeparatorTe mplate>
</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:SiteMapPat h ID="SiteMapPath " runat="server">
<PathSeparatorT emplate>
<img src="~/Images/arrow-right.jpg" />
</PathSeparatorTe mplate>
</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 4531
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:SiteMapPat h ID="SiteMapPath " runat="server">
<PathSeparatorT emplate>
<img src="Images/arrow-right.jpg" />
</PathSeparatorTe mplate>
</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:SiteMapPat h ID="SiteMapPath " runat="server">
<PathSeparatorT emplate>
<img src="~/Images/arrow-right.jpg" />
</PathSeparatorTe mplate>
</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
20655
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. http://www.officeactivate.com/web-site-design.shtml Any ideas? thanks.
17
3214
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 control so I can add a skinid. I tried adding runat="server" and the skinid to the existing control, but that didn't work. Any other ideas? TIA --
5
3222
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: <siteMapNode title="annual report" description="Annual report" url="Pages/ir_annuals.aspx" /> but the sitemappath control doesn't show the path if the page has the url
0
1349
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" PathSeparator=" | "> <PathSeparatorStyle Font-Bold="true" Font-Names="Verdana" /> </asp:SiteMapPath> I'd like to set many other properties as well so that I don't have to configure the styles on each page but I can't find any examples online to show how...
3
4463
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 the user chooses in the Articles page. The way it is set up now, if the user selects a particular article in the 'Articles' page, the SiteMap looks like this: '. . . Articles Article'. Assuming the user choses a cookie baking article, I would like...
2
2458
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 class in a custom control, creating a property for each of these images (EnabledImageUrl, DisabledImageUrl) and then overrode the Enabled property to change base.ImageUrl respectively. I am also trying to use Themes with this web site. The problem...
1
2484
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 section navigation provided via a horizontal menu, a SiteMapPath to provide a breadcrumb and a vertical menu component on the left edge.
2
4269
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 Each page receives a query string i.e. productGroup.aspx?id=9 The page then renders with the appropriate details which have been accessed
4
1338
by: lionel luo | last post by:
how to find where is the imagelogo? Please advice.Thansk. Code:---------------------------------------------------- private Image __BuildControlImageLogo () { Image image1 = new Image (); base.ImageLogo = image1; image1.SkinID = "ImageLogo"; image1.ApplyStyleSheetSkin (this.Page); image1.BorderWidth = new Unit (0D, UnitType.Pixel);
0
9710
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9589
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10593
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10340
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10329
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10085
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5663
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4304
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3830
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.