//List列中索引的赋值
teacher.DataValueField = ds.Tables[0].Columns["pidcord"].ColumnName;
//List列中下拉框值的赋值(显示的值)
teacher.DataTextField = ds.Tables[0].Columns["pname"].ColumnName;
teacher.DataBind();
//调用dropdownlist的下拉框文本选择值
teacher.SelectedItem.Text.ToString()
//调用dropdownlist选择值的索引
teacher.SelectedValue ;