请教:有关DropDownList绑定的问题 label1.text为编辑前的值.DropDownList1.Items.FindByText(label1.text).Selected =true 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 DropDownList1.Items.Add(new ListItem(myReader["SendName"].ToString(),myReader["unitType"].ToString ()));strSQL="SELECT "+(string)Application["sqldlDataGrid1"]+" from "+strViewName +" where (日期<='"+strTextBox2+" 'and 日期>='"+strTextBox1+"') "+tempStr;//and UI =" +DropDownList2.SelectedItem .Value ; SqlDataAdapter myAdapter=new SqlDataAdapter(strSQL,myConnection); DataSet myDataSet=new DataSet(); myAdapter.Fill(myDataSet,"strDropDownList2"); DataGrid1.DataSource=myDataSet.Tables["strDropDownList2"].DefaultView; DataGrid1.DataBind (); DATAGRID绑的是DATASET吧?你把它绑那个DATASET得到,然后绑到DropDownList上啊。DepaList是一个DropDownList DataSet Result = (DataSet) Sacc.QueryResult; this.DepaList.DataTextField = "DEPARTMENT_NAME"; this.DepaList.DataValueField = "DEPARTMENT_ID"; this.DepaList.DataSource = Result.Tables[0].DefaultView; this.DepaList.DataBind(); 请问在vs2003中如何加入flash动画 急求一个正则 dt.rows.count=0???? [讨论] PetShop 中的 SQLHelper 类中的方法为什么全是静态的? 紧急求救(发邮件不成功) 请问如保访问Littlechip.DataGridPager的PageCount属性? 最后90分提问,求救!关于WebClient,HttpRequest等方式获取网页的问题! FreeTextBox 1.63中文版上传图片提示上传失败!!!! 怎样取得存储过程返回的值?(在线=,急) 一个file控件的问题!很着急!求助!! 准备跳(散分) 关于动态按钮(紧急求救)
SqlDataAdapter myAdapter=new SqlDataAdapter(strSQL,myConnection);
DataSet myDataSet=new DataSet();
myAdapter.Fill(myDataSet,"strDropDownList2");
DataGrid1.DataSource=myDataSet.Tables["strDropDownList2"].DefaultView;
DataGrid1.DataBind ();
this.DepaList.DataValueField = "DEPARTMENT_ID"; this.DepaList.DataSource = Result.Tables[0].DefaultView; this.DepaList.DataBind();