How to show tooltip on movable listbox

I have the following control on my aspx page

<asp:ListBox ID = "X" runat="Server" CssClass = "listbox"></asp:ListBox>

I have to show a tooltip on the list item, where items are movable means i can change the position of any item on UI.

I have added my custom method on page load

protected void Page_Load(){
  foreach(ListItem li in X {.
    string tip = li.Text;
    li.Attribute.Add("title",tip) })}

But the issue is tooltip is coming only for the loaded page, As soon as I change the position of the list item it still shows the old tooltip.

Any way to handle this scenario?

107 thoughts on “How to show tooltip on movable listbox”

Leave a Comment