开发者

Assign attribute web control

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:Dro开发者_C百科pDownList ID="ddlBranch" runat="server" Width="350px" ToolTip='<% ddlBranch.Value %>'>

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

Regard


Try this

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

      }
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜