当前位置: 首页 > 图文教程 > 网络编程 > ASP.NET > C#:ListBox的2个常用方法Add,Clear与Items的2个属性

ASP.NET
Web服务器控件:LinkButton控件
Web服务器控件:ListBox控件
Web服务器控件:ListItem控件
Web服务器控件:Literal控件
Web服务器控件:Panel控件
Web服务器控件:PlaceHolder控件
Web服务器控件:RadioButton控件
Web服务器控件:RadioButtonList控件
Web服务器控件:BulletedList控件
Web服务器控件:Style控件
Web服务器控件:Table控件
Web服务器控件:TableCell控件
Web服务器控件:TableRow控件
Web服务器控件:TextBox控件
Web服务器控件:XML控件
Validation服务器控件:CompareValidator控件
Validation服务器控件:CustomValidator控件
Validation服务器控件:RangeValidator控件
Validation服务器控件:RegularExpressionValidator控件
Validation服务器控件:RequiredFieldValidator控件

ASP.NET 中的 C#:ListBox的2个常用方法Add,Clear与Items的2个属性


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-11-03   浏览: 141 ::
收藏到网摘: n/a

listBox1.Items.Clear() 清除listBox中的item;
listBox1.Items.Count 获取listBox的item数目;
listBox1.Items[n] 获取listBox中的第n个item;
listBox1.Items.Add("123") 向listBox中添加一个item;