473,386 Members | 1,886 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,386 software developers and data experts.

Menu control and images

Hi

I'm trying to use the menu control but o would like ot use images
instead of text.
I can't get it to work.

I can't find much info on the Menu databindings editor , wich i think
that's the place where i will set up my image and navigate info.

I could do it with an item template, but i still need the binding.

other wise could it be possible to configure the width of each menu
item so that they are all equal width and that the mouse over happens
on the cell and not on the text link only

thanks for your input

Nov 20 '05 #1
4 1440
Hi,

a Menu can't show individual icons per menu item. A menu item doesn't
have a property to store this information. You can put HTML in the Text
property of a menu item, and thus you can place an image in there using
the img tag. Use the following web.sitemap file to try it out. (you can
use the Value property to store the key for your menu item).

Grtz, Wouter

<siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" >
<siteMapNode url="Default.aspx" title="&lt;img src='blah'&gt;"
description="">

</siteMapNode>
</siteMap>

Nov 20 '05 #2
Looks like it should work

my problem now is i use :

<siteMapNode url="default.aspx" title="&lt; img
src='~/images/Home.jpg'&gt;" description=""/>

in web.sitemap

and the text is being displayed :< img src='~/images/Home.jpg'> not the
image

any clues why

thanks

Nov 20 '05 #3
You are only missing the end forward slash '/' before the closing tag '>' :
This works for me which displays both an image and the text 'Members':

<siteMapNode title="<img src='Images/icon_usergroup.gif'
style='border-style:none' /> Members" url="IE/Members.aspx" />

Feb 2 '06 #4
Noticed two shortcomings with this approach...

1) a breadcrumb gets screwed as it now displays the html for <img.... not
very good.

2) having the pages in the menu on different physical folder levels makes
the images not being displayed when navigating to a page on another level.

Any suggestions to this? I would like to extend the sitemap, building a
custom provider for it, but don't know how to... Overkill?
Feb 2 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Ben | last post by:
Hi, I'm using images in my menu control. I have my menu setup based on this example: http://msdn2.microsoft.com/en-US/library/system.web.ui.webcontrols.menuitembinding.imageurlfield(VS.80).aspx ...
1
by: Carl Gilbert | last post by:
Hi Could someone please advise on the best method to achieve the following. I want a flat menu which uses images rather than text for each menu item. All items will have the same image...
5
by: Victor | last post by:
Hi Guys. I am currently having a problem with my menu control. The requirement for menu is. All root menuitems will be displayed as images. The image for each root menuitem will be different. All...
0
by: KBTibbs | last post by:
I've got a Menu control that will be used for navigation around my site. I would like to have my menu be a series of images with mouseover image swapping. I found a blog entry that seems promising...
7
by: Mel | last post by:
What control do I use for a menu on a web page? How do I add a check box to an menu item? I have a menu called Chart and beneath it I have a menu item called Publish. I want to display a checked...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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,...

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.