string[] StrMy={"123","456","678"};
cmbbox.DataSoure=StrMy;

解决方案 »

  1.   

    from Quickstart tutorial:<html>
    <head>
        <script language="C#" runat="server">
            void Page_Load(Object Sender, EventArgs E) {
                if (!Page.IsPostBack) {
                   ArrayList values = new ArrayList();               values.Add ("IN");
                   values.Add ("KS");
                   values.Add ("MD");
                   values.Add ("MI");
                   values.Add ("OR");
                   values.Add ("TN");               DropDown1.DataSource = values;
                   DropDown1.DataBind();
                }
            }        void SubmitBtn_Click(Object sender, EventArgs e) {
               Label1.Text = "You chose: " + DropDown1.SelectedItem.Text;
            }    </script></head>
    <body>    <h3><font face="Verdana">DataBinding DropDownList</font></h3>    <form runat=server>
        
            <asp:DropDownList id="DropDown1" runat="server" />        <asp:button Text="Submit" OnClick="SubmitBtn_Click" runat=server/>        <p>
            
            <asp:Label id=Label1 font-name="Verdana" font-size="10pt" runat="server" />    </form></body>
    </html>
      

  2.   

    sorry,  luningjfy_2001(ln) , my net is slow
      

  3.   

    A a = new A()
    a.b="test";
    this.textBox1.DataBindings.Add("Text", new A[]{a}, "b");
      

  4.   

    先进行数据库连接找到相应的表放到DataSet中从DataSet中进行绑定
    comboBox3.DataSource = DataSet ;
    comboBox3.DisplayMember = "" ;
    comboBox3.ValueMember = "" ;
      

  5.   

    数据资源可以存放在很多地方如:
    ArrayList,DataSet等.....
    DropDown1.DataSource = 你要的数据资源;
    DropDown1.DataBind();//数据绑定