This is a migrated thread and some comments may be shown as answers.

Menu Item with Image only?

2 Answers 49 Views
Menu
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
David A.
Top achievements
Rank 1
David A. asked on 10 Nov 2011, 02:53 PM
Hi,

I would like to have a menu item without text and only have an image via ImageUrl.  When I set .Text("") I get "value cannot be null or empty." 

Is there a way to create a menu item without text?

David

2 Answers, 1 is accepted

Sort by
0
Accepted
Dimo
Telerik team
answered on 10 Nov 2011, 05:31 PM
Hi David,

Try using a space or an nbsp entity as item text. You can even use

menu.Add().Text("<!-- -->").Encoded(false)

which will also remove the space after the image.

Kind regards,
Dimo
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the Telerik Extensions for ASP.MET MVC, subscribe to their blog feed now
0
David A.
Top achievements
Rank 1
answered on 11 Nov 2011, 03:13 PM
Perfect! Thanks again Dimo. 
Tags
Menu
Asked by
David A.
Top achievements
Rank 1
Answers by
Dimo
Telerik team
David A.
Top achievements
Rank 1
Share this question
or