有关ListItem添加提示或者其他信息的问题!
前几天在这里回答一个有关DropDownList的问题发现DropDownList不能用titile来显示详细信息或者未显示的出来的信息,网上找了很多地方,找到了几个js的方法,不只那个兄弟最后解决了没有!今天我也碰到一个同样的问题不是DropDownList而是如下的空件:
<asp:RadioButtonList id="RadioButtonList1" runat="server" Width="100%" RepeatLayout="Flow">
<asp:ListItem Value="1">1</asp:ListItem>
<asp:ListItem Value="2">2</asp:ListItem>
</asp:RadioButtonList>
我现在的目的也是要用户将鼠标移动到这个上面显示一段详细的信息,可是失败了!
//============================================================
它产生的客户端代码是这样的:
<span id="RadioButtonList1" style="width:100%;"><input id="RadioButtonList1_0" type="radio" name="RadioButtonList1" value="1" /><label for="RadioButtonList1_0">1</label><br><input id="RadioButtonList1_1" type="radio" name="RadioButtonList1" value="2" /><label for="RadioButtonList1_1">2</label></span>
我在里面的任何一个对象上面添加title后保存成html用IE浏览可以出来提示,可是我就是怎么也添加不进去。
//============================================================
我添加Title的代码如下:
foreach(ListItem item in this.RadioButtonList1.Items){
item.Attributes.Add("title","adasfasdfasdfa");
}
不管加什么,加多少都客户端代码都没有变化!有谁知道怎么办!!!!