注册 登录
编程论坛 ASP.NET技术论坛

dropdownlist取值问题

rong0334 发布于 2010-03-16 09:02, 893 次点击
我使用这样绑定的
  DropDownList1.DataSource = ds.Tables[0];
   DropDownList1.DataValueField = "id";
   DropDownList1.DataTextField = "typename";
   DropDownList1.DataBind();
下面这个会错 数据应该有的,我只知道它要取的第几个
 DropDownList1.Items[2].Text;// ??
或者怎么样取到第N个的值??
5 回复
#2
rong03342010-03-16 09:29
问题是不是太简单了吗?
小弟刚刚开始学习
#3
chenhao198602010-03-16 11:11
undefined
#4
chenhao198602010-03-16 11:47
回复 楼主 rong0334
undefined
#5
chenhao198602010-03-16 11:48
undefined
#6
chenhao198602010-03-16 11:51
回复 楼主 rong0334
undefined
1