lmxdj@hotmail
加我msn我给你代码!

解决方案 »

  1.   

    SqlDataAdapter da=new SqlDataAdapter();
                     da.Fill(DataSet1,"表的名称")           
                      txtHYType--一个DropDownList
                               this.txtHYType.DataSource=DataSet1.Tables["表的名称"];
    this.txtHYType.DataTextField="在DropDownList上显示的值";
    this.txtHYType.DataValueField="在DropDownList上隐藏的值";
    this.txtHYType.DataBind();