DropDownList - ToolTip

G

Guest

hi all,
i tried to create foreach item in DropDownList a ToolTip.
It doesn't work. any idea ?

DropDownList ddl;
DataTable dt = (DataTable)Session["list"];
foreach (DataRow dr in dt.Rows)
{
ListItem li = new ListItem(dr["name"].ToString(),
dr["id"].ToString());
li.Attributes["title"] = "1111";
ddl.Items.Add(li);
}
 
E

Eliyahu Goldin

ListItem renders as an option html element which doesn't support title
property.

Eliyahu
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top