I’m trying to add a text-only item to a databound menu control. So far all I’m capable of doing is adding more links, but no text. My goal is to have a leading item be part of the menu but not a link. I want it to be displayed as text…
I’ve tried adding items to the menu.items collection, but this adds links.
I’ve tried adding items to the menu.controls collection, but this doesn’t get picked up at all, just ignored.
Thanks for the help.
Make the menuitem not selectable:
menuItem.Selectable = FalseIt will still generate an anchor element (
<a>) but without a href or onclick it displays as a span.or