2
Reply

how can i connect conbobox to my SQL server database.

inder kumar

inder kumar

Nov 10, 2010
5k
0

    Hi,

    You can connect Combobox to SQLDB by using following code:-

    ComboBox.DataSource = objSqlDataset;
    ComboBox.DataTextField = "DisplayCol" // Column name which you want to display.
    ComboBox.DataValueField =  "ValueCol"
    ; // Column which you want to use for value.
    ComboBox.DataBind();

    Vivek Srivastava
    December 03, 2010
    0


    Steps:
    1. Drag and drop the combo box
    2. If you see the dropdownlist in design mode, you can see the small greater than symbol, If you click on it you have a option like choose Datasource,
    3. Then you can connect to your database.

    Jiteendra Sampathirao
    November 17, 2010
    0