Reputation: 4530
I have a bulleted list set to BulletedListDisplayMode.HyperLink
display mode, and it works fine but I cannot find a way to specify the title tag for each hyperlink. Can this be done?
Thanks!
Upvotes: 1
Views: 445
Reputation: 2344
This is not possible out of the box as under the hood BulletedList binds to a ListItem which does not have any such property.
You can deal with this a few ways -
1) Handle the OnPreRender event, loop through all items and add using Attributes.Add()
2) Create a custom control which inherits from BulletedList and add a title property.
3) Get rid of the BulletList all together and use a Repeater
Personally I would go for 3) as you then have much more flexibility in the output.
Upvotes: 2
Reputation: 3723
Have you tried using the BulletedList.AddAttributesToRender
method?
Upvotes: 1