views:

20

answers:

1

Hi all. I have dropdownlist with text to display and value as hidden value. I want keep changing value tooltip as value when user select other selection. Well, I am already try this code but not work properly:

<asp:DropDownList ID="ddlBranch" runat="server" Width="350px" ToolTip='<% ddlBranch.Value %>'>

Display in firefox dropdownlist tooltip as <% ddlBranch.Value %>

Regard

A: 

Try this

for (int i = 0; i <= DropDownList1.Items.Count - 1; i++)
      {
        DropDownList1.Items[i].Attributes.Add("Title", DropDownList1.Items[i].Text);

      }
Shoban