Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I have a CheckBoxList , I want to assign tooltip to all the checkboxes. How is it possible? I cannot find any property associated with this.

 <asp:CheckBoxList ID="XYZ" RepeatColumns="3" Width="300" runat="server">
            <asp:ListItem Text="ST01" Value="ST01" />
            <asp:ListItem Text="ST02" Value="ST02" />
            <asp:ListItem Text="ST03" Value="ST03" />
            <asp:ListItem Text="ST04" Value="ST04" />
            <asp:ListItem Text="ST05" Value="ST05" />
            <asp:ListItem Text="ST06" Value="ST06" />
            <asp:ListItem Text="ST07" Value="ST07" />
            <asp:ListItem Text="ST08" Value="ST08" />
            <asp:ListItem Text="ST09" Value="ST09" />
        </asp:CheckBoxList>
share|improve this question
add comment

2 Answers

up vote 2 down vote accepted

Got it

    foreach (ListItem li in cblAffectedST.Items) 
    { 
        li.Attributes.Add("title", "ToolTip of Text " + (i + 1).ToString());
        i++; 
    }
share|improve this answer
add comment

You could have also added the Title to your markup like: <asp:ListItem Text="ST01" Value="ST01" Title="This is a tooltip!"/>

I know it might not show in Autocomplete, but it does work.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.