1

I have a list like so:

<asp:CheckBoxList ID="status" runat="server" CssClass="smallradios" 
RepeatDirection="Horizontal" RepeatLayout="flow">

<asp:ListItem Selected="true" Value="O" Text="Item1"></asp:ListItem>
     <asp:ListItem Selected="true" Value="P" Text="Item2>"></asp:ListItem>
      <asp:ListItem Selected="true" Value="I" Text="Item3"></asp:ListItem>
</asp:CheckBoxList>

This is my Visual Basic code: Adding hovertext options

chlStatus.Items(0).Attributes.Add("onmouseover", "this.title='Hello")
chlStatus.Items(1).Attributes.Add("onmouseover", "this.title='everyone!'")
chlStatus.Items(2).Attributes.Add("onmouseover", "this.title='How are you?'")

I am putting this in the Page Load section of the Visual Basic file, but for some reason the title does not show up when I hover over the respective list item. Can someone tell me what I'm doing wrong? Thanks!

Arion
  • 31,011
  • 10
  • 70
  • 88
lordmarinara
  • 267
  • 5
  • 15

1 Answers1

2

This might help:

chlStatus.Items(0).Attributes.Add("title", "Hello")
chlStatus.Items(1).Attributes.Add("title", "everyone!")
chlStatus.Items(2).Attributes.Add("title", "How are you?")
Arion
  • 31,011
  • 10
  • 70
  • 88