ArrayList.Add方法问题。请大家来关注一下
给DropDownList控件动态添加数值:如
ArrayList al=new ArrayList();
al.Add("2003年");
al.Add("2004年");
DropDownList1.DataSource=al;
DropDownList1.DataBind();
string value=DropDownList1.SelectedItem.Value.ToString();
Response.Write(value);
输出的value值是“2003年”,我想问的就是:这里DropDownList1的text属性和value属性值是一样的。也就是说用ArrayList.Add方法能不能分开添加DropDownList1的text属性和value属性值。或者说怎么样能得到是int型的value 属性值