<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://weblogs.asp.net/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>SiteMap menu with icons</title><link>http://weblogs.asp.net/bleroy/archive/2006/01/24/436350.aspx</link><description>While binding a Menu (or TreeView : everything in this article applies to TreeView as well) to a SiteMapDataSource is very easy, it can prove challenging to find how to extend the site map with custom properties and use these extended properties in a</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>re: SiteMap menu with icons</title><link>http://weblogs.asp.net/bleroy/archive/2006/01/24/436350.aspx#6755115</link><pubDate>Wed, 26 Nov 2008 13:13:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6755115</guid><dc:creator>anie</dc:creator><author>anie</author><description>&lt;p&gt;Hi Bertrand, just found out why it didn&amp;#39;t work out. My mistake, my asp:menu tag was not complete. It runs well now, Thanks..&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6755115" width="1" height="1"&gt;</description></item><item><title>re: SiteMap menu with icons</title><link>http://weblogs.asp.net/bleroy/archive/2006/01/24/436350.aspx#6754886</link><pubDate>Wed, 26 Nov 2008 10:05:35 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6754886</guid><dc:creator>anie</dc:creator><author>anie</author><description>&lt;p&gt;Hi Bertrand, need help on this.&lt;/p&gt;
&lt;p&gt;I&amp;#39;m new in this kind of stuff, and I&amp;#39;m trying to have image buttons instead of text in the sitemap. I&amp;#39;m using web.sitemap file from ASP.Net. Then I specified this in my masterpage:&lt;/p&gt;
&lt;p&gt;&amp;lt;asp:Menu ID=&amp;quot;Menu1&amp;quot; Runat=&amp;quot;server&amp;quot; DataSourceID=&amp;quot;SiteMapDataSource1&amp;quot; Target =&amp;quot;_blank&amp;quot; Orientation=&amp;quot;Horizontal&amp;quot; StaticDisplayLevels=&amp;quot;2&amp;quot; DynamicEnableDefaultPopOutImage=&amp;quot;false&amp;quot; StaticEnableDefaultPopOutImage =&amp;quot;false&amp;quot;&amp;gt;&amp;lt;/asp:Menu&amp;gt;&lt;/p&gt;
&lt;p&gt;And add some coding part as you said in the article.&lt;/p&gt;
&lt;p&gt;But it still return text-sitemap, not image sitemap the way I want. Is there anything I should add or something?&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6754886" width="1" height="1"&gt;</description></item><item><title>re: SiteMap menu with icons</title><link>http://weblogs.asp.net/bleroy/archive/2006/01/24/436350.aspx#6633169</link><pubDate>Fri, 19 Sep 2008 00:09:10 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6633169</guid><dc:creator>celik</dc:creator><author>celik</author><description>&lt;p&gt;Thanks, very helpful&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6633169" width="1" height="1"&gt;</description></item><item><title>re: SiteMap menu with icons</title><link>http://weblogs.asp.net/bleroy/archive/2006/01/24/436350.aspx#6438170</link><pubDate>Thu, 24 Jul 2008 08:01:11 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6438170</guid><dc:creator>exz</dc:creator><author>exz</author><description>&lt;p&gt;thanks, just what I was looking for.&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6438170" width="1" height="1"&gt;</description></item><item><title>re: SiteMap menu with icons</title><link>http://weblogs.asp.net/bleroy/archive/2006/01/24/436350.aspx#6408409</link><pubDate>Wed, 16 Jul 2008 22:43:37 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6408409</guid><dc:creator>Bertrand Le Roy</dc:creator><author>Bertrand Le Roy</author><description>&lt;p&gt;@Omego2K: err, the menu item does: &lt;a rel="nofollow" target="_new" href="http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.menuitem.imageurl.aspx"&gt;msdn.microsoft.com/.../system.web.ui.webcontrols.menuitem.imageurl.aspx&lt;/a&gt;&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6408409" width="1" height="1"&gt;</description></item><item><title>re: SiteMap menu with icons</title><link>http://weblogs.asp.net/bleroy/archive/2006/01/24/436350.aspx#6408385</link><pubDate>Wed, 16 Jul 2008 22:37:48 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6408385</guid><dc:creator>Omego2K</dc:creator><author>Omego2K</author><description>&lt;p&gt;but since a Menu control doesn&amp;#39;t understand the imageURL property, how do you get it to display the image?&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6408385" width="1" height="1"&gt;</description></item><item><title>re: SiteMap menu with icons</title><link>http://weblogs.asp.net/bleroy/archive/2006/01/24/436350.aspx#6111484</link><pubDate>Sat, 19 Apr 2008 01:11:37 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6111484</guid><dc:creator>Bikaram</dc:creator><author>Bikaram</author><description>&lt;p&gt;Thanks This was very useful to me&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6111484" width="1" height="1"&gt;</description></item><item><title>re: SiteMap menu with icons</title><link>http://weblogs.asp.net/bleroy/archive/2006/01/24/436350.aspx#5590726</link><pubDate>Fri, 11 Jan 2008 20:51:35 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:5590726</guid><dc:creator>cxspan</dc:creator><author>cxspan</author><description>&lt;p&gt;errr... slight modification to work with top-level menu items:&lt;/p&gt;
&lt;p&gt;string hideOnMenu = ((SiteMapNode)e.Item.DataItem)[&amp;quot;hideOnMenu&amp;quot;];&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (hideOnMenu != null &amp;amp;&amp;amp; bool.Parse(hideOnMenu))&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;MenuItem parent = e.Item.Parent;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (parent != null) parent.ChildItems.Remove(e.Item);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;else (sender as Menu).Items.Remove(e.Item);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=5590726" width="1" height="1"&gt;</description></item><item><title>re: SiteMap menu with icons</title><link>http://weblogs.asp.net/bleroy/archive/2006/01/24/436350.aspx#5590648</link><pubDate>Fri, 11 Jan 2008 20:34:28 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:5590648</guid><dc:creator>cxspan</dc:creator><author>cxspan</author><description>&lt;p&gt;Freakin&amp;#39; sweet! (Peter Griffin voice)&lt;/p&gt;
&lt;p&gt;This is just what I needed to figure out how to *remove* Menu items programmatically. &amp;nbsp;I couldn&amp;#39;t just remove them from my sitemap b/c I still wanted them to show up in the breadcrumbs (don&amp;#39;t ask). &amp;nbsp;I added a &amp;quot;hideOnMenu&amp;quot; property to the sitemapnodes I wanted hidden and set it to true.&lt;/p&gt;
&lt;p&gt;Then, in the MenuItemDataBound event I added the following:&lt;/p&gt;
&lt;p&gt;MenuItem parent = e.Item.Parent;&lt;/p&gt;
&lt;p&gt;string hideOnMenu = ((SiteMapNode)e.Item.DataItem)[&amp;quot;hideOnMenu&amp;quot;];&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (hideOnMenu != null)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (bool.Parse(hideOnMenu))&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;parent.ChildItems.Remove(e.Item);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t know if this is the best solution, but it&amp;#39;s working great for me!!&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=5590648" width="1" height="1"&gt;</description></item><item><title>re: SiteMap menu with icons</title><link>http://weblogs.asp.net/bleroy/archive/2006/01/24/436350.aspx#5415275</link><pubDate>Fri, 07 Dec 2007 02:21:57 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:5415275</guid><dc:creator>Don Irwin</dc:creator><author>Don Irwin</author><description>&lt;p&gt;Great post Bertrand. &amp;nbsp;Know of any way to change the image on hover? &amp;nbsp;Say a grayscale image until the user hovers over an icon and then diplay the same image in color.&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=5415275" width="1" height="1"&gt;</description></item></channel></rss>