开发者

ToolTip for individual item in asp.net dropdown control

开发者 https://www.devze.com 2023-01-13 21:32 出处:网络
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 con

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)");
}
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号