views:

18

answers:

1

Hi,

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.Its difficult to the user to see entire value in dropdwon to select a correct value.So i decided to make a tool tip for each item in dropdown control. Is it possible? if yes then how can i do this.I need u'r suggestion.

Help me on this

Thanks in advacne.

+2  A: 

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)");
}
Jakob Gade
Thanks for your reply. could you paste some sample code snippets.
Gulshan
Sure, did just that a moment ago... :)
Jakob Gade
its not working for me.I am using IE6.
Gulshan
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.
Jakob Gade
The title is correctly rendered in each option.But dono what's the problem.:(
Gulshan