Tuesday, March 16, 2010

C# Adding Hover Text to ListItems

To add hover text to list items just add the attribute "Title" to the ListItem.  For Example:

ListItem LI = new ListItem();
LI.Text = Convert.ToString(dr["Text"]);
LI.Value = Convert.ToString(dr["Value"]);
LI.Attributes.Add("Title", Convert.ToString(dr["HoverText"] + ""));



1 comment:

Anonymous said...

Thanks, was looking for this.