[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

images in sitemap in asp.net

Posted on 2011-04-19
5
Medium Priority
?
411 Views
Last Modified: 2012-05-11
Hi,
I developed an asp.net application, in that i used sitemap control for navigation and it is working fine, but the problem is i could not apply images/icons for the navigation links. I dont know the reason why i could not use that, so please help me in this.
i followed these links -
http://forums.asp.net/p/1105905/1699336.aspx
http://weblogs.asp.net/bleroy/archive/2006/01/24/436350.aspx

and i tried with the following code to apply the images -

<siteMapNode url="default.aspx" title="Home"  description="The home page" imageUrl="home.gif">


thanks in advance
0
Comment
Question by:CPSRI
  • 2
  • 2
5 Comments
 
LVL 38

Accepted Solution

by:
Tom Beck earned 2000 total points
ID: 35426714
Did you try this?

<siteMapNode url="default.aspx" title="&lt;img src='home.gif' style='vertical-align:middle; border:none'&gt;Home"  description="The home page">
0
 
LVL 12

Expert Comment

by:CmdoProg2
ID: 35426916
try this on the menu page accordding to the second link.  It work for my master page with no title if image is specified for

    <siteMapNode url="Default.aspx" title="Home"  description="The Home Page" imageURL="~/images/home.gif"/>

I use root reference for the image path..
 
Private Sub MnMenu_MenuItemDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.MenuEventArgs) Handles MnMenu.MenuItemDataBound
    Dim imageUrl As String = CType(e.Item.DataItem, SiteMapNode)("imageUrl")
    If String.IsNullOrEmpty(imageUrl) = False Then
      e.Item.ImageUrl = imageUrl
      e.Item.Text = ""
    End If
  End Sub

Open in new window

0
 

Author Comment

by:CPSRI
ID: 35427028
thanks tommyboy and CmdoProg2, for your replies, let me try with the both comments and ill get back to you
0
 

Author Closing Comment

by:CPSRI
ID: 35791343
Thank you . Thank you Very Much
0
 
LVL 38

Expert Comment

by:Tom Beck
ID: 35798413
You're welcome, glad it worked for you. Thanks for the points.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this Article, I will provide a few tips in problem and solution manner. Opening an ASPX page in Visual studio 2003 is very slow. To make it fast, please do follow below steps:   Open the Solution/Project. Right click the ASPX file to b…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Integration Management Part 2
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …
Suggested Courses

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question