Menu Image

U

Uriah Piddle

Hi Gang,

Does anyone know how to insert an image next to the text of a dynamic menu
item in the Asp.Net 2.0 menu control?

Thanks.

Steve
 
M

Masudur

Hi Uriah Piddle,

Its very simple. If you creating Menu in designer. Go to Item
Collection and then
Specify the ImageUrl Property of a menu item.
And to more customize you have DynamicMenuStyle, DynamicMenuItemStyle,
DynamicHoverStyle etc.
And if you are creating menu in code then

MenuItem mnitem = new MenuItem("Menu Item", -1,
"http://localhost/myimage.gif");

will do the job.

But if you are populating Menu item from datasource. You need to
customize menu item in MenuItemDataBound event.

Thanks
Md. Masudur Rahman
www.kaz.com.bd
KAZ Software Ltd.
Software outsourcing made simple...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top