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

Setting ID of Generated <LI> tags

1 Answer 31 Views
Menu
This is a migrated thread and some comments may be shown as answers.
James
Top achievements
Rank 1
James asked on 14 May 2008, 02:42 AM
Is there any way to set the ID attribute of the <LI> tags generated by the menu. I was hoping one of the databound fields would suffice as I'd prefer keep everything declarative.

Thanks!

James

1 Answer, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 15 May 2008, 02:03 PM
Hi James,

Setting the ID attribute of the LI tag is not possible. You can however apply ID to the A tag rendered by the menu item. If this is viable for your case you can use the following code:

item.Attributes["id"] = "itemID";

I hope this helps,
Albert
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Menu
Asked by
James
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Share this question
or