1

In my web site I have one asp.net dropdown control. The length of value in the control is too long to display 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?

1 Answer 1

2

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)");
}
Sign up to request clarification or add additional context in comments.

4 Comments

Thanks for your reply. could you paste some sample code snippets.
Sure, did just that a moment ago... :)
Are you sure? Check the rendered HTML to confirm the attribute is inserted correctly. I don't have IE6 installed, so I can't test it myself, sorry.
The title is correctly rendered in each option.But dono what's the problem.:(

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.