ASP.NET整理:DrpDownList,用法,…
来源:互联网 发布:java web学生信息修改 编辑:程序博客网 时间:2024/06/07 07:27
十六.DropDownList
属性:
AutoPostBack:在做DataList排序的时候会用到
DataTextField
DataValueField
SelectedIndex
SelectedItem
SeletedValue<==>SeletectedItem.Value
事件:
SelectedIndexChanged
往控件内添加数据:
1.通过代码添加:
for(int
{
//第一个参数:DataTextField
//第二个参数:DataValueField
ListItem
this.dropDownList1.Items.Add(li);
}
2.通过指定数据源进行添加:
this.dropDownList.DataSource
this.dropDownList.DataTextField
this.dropDownList..DataValueField
this.dropDownList.DataBind();
this.dropDownList.Items.Insert(0,new
我的更多文章:
- (2012-09-08 13:09:19)
- (2012-09-08 13:09:05)
- (2012-09-08 13:04:14)
- (2012-09-08 12:54:54)
- (2012-09-08 12:52:01)
- (2012-09-08 12:48:53)
- (2012-09-08 12:46:40)
- (2012-09-03 20:54:24)
- (2012-09-02 12:48:05)
- (2012-07-26 15:42:32)
- ASP.NET整理:DrpDownList,用法,…
- ASP.NET整理:GridView,基本用法…
- ASP.NET整理:GridView,基本用法,高级用法,分页
- ASP.NET整理:Cookie,Application,…
- ASP.NET整理:DataList分页PagedDa…
- ASP.NET整理:Server对象Execute,…
- ASP.NET常识整理
- ASP.NET常识整理
- ASP.NET常识整理
- Asp.Net 整理(文件)
- ASP.NET常识整理
- ASP.NET常识整理
- ASP.NET大整理
- ASP.NET大整理
- ASP.NET整理:TreeView
- Asp.net技术整理
- Asp.net Cookies用法
- Asp.net 事务用法
- ASP.NET整理:站点地图,验证码,…
- ASP.NET整理:TreeView
- ASP.NET整理:用户登录和注册的参…
- ASP.NET整理:DataList分页PagedDa…
- Java容器类List、ArrayList、Vector及map、HashTable、HashMap的区别与用法
- ASP.NET整理:DrpDownList,用法,…
- 云计算概念
- ASP.NET整理:GridView,基本用法…
- android.widget.HorizontalScrollView
- ASP.NET整理:Server对象Execute,…
- ASP.NET:JSON下的Ajax(JQuery&Aja…
- 值得关注的blog
- ASP.NET:JsonHelper类:ConvertDat…
- ASP.NET:JSONHelper:json扩展类