DropDownList语解释
DropDownList属性不是很懂,请大家解释下以下代码:
DropDownList1.DataSource=DataSet1.Tables["ClassName"].DefaultView;
DropDownList1.DataTextField="className";
DropDownList1.DataValueField="className";
DropDownList1.DataBind();
DropDownList1.Items.Add("全部");
DropDownList1.Items.FindByText("全部").Selected=true;
ListItem d=new ListItem(classname,classname);
DropDownList1.Items.Add(d);