DropDownList.Items的常用方法
在最后一项添加:
DropDownList .Items.Add( "text" );
or
DropDownList .Items.Add(new ListItem(" text"," value" ));
在指定的位置添加一项:
DropDownList .Items.Insert( index, new ListItem(" text"," value"));
移除指定的项:
DropDownList .Items.Remove("text");
or
DropDownList .Items.RemoveAt( index );
移除所有的项:
DropDownList .Items.Clear();
项的总数:
DropDownList .Items.Count