ToolTip for individual item in asp.net dropdown control
In my web site I have one asp.net dropdown control. The length of value in the control is too long to displ开发者_开发百科ay in that control. I can't increase the size of control because of space consistency in my website. It's difficult to the user to see entire value in dropdown to select a correct value.
How to make a tool tip for each item in dropdown control?
Yes, you can add a "title" property to each item. But I doubt your visitors will notice this rather subtle hint.
foreach (ListItem item in YourDropDownList.Items)
{
item.Attributes.Add("title", "(the long description)");
}
精彩评论