<asp:DropDownList ID="DropDownList1" runat="server" onselectedindexchanged="DropDownList1_SelectedIndexChanged"> </asp:DropDownList>
String mdbCon = "PROVIDER=Microsoft.Jet.OLEDB.4.0;Data Source=D:\\InspectionR\\Database1.mdb"; DataSet ds1 = new DataSet(); string db = "SELECT MODEL_NAME FROM MODEL_LIST"; using (OleDbConnection cn = new OleDbConnection(mdbCon)) { using (OleDbDataAdapter da = new OleDbDataAdapter(db, cn)) { da.Fill(ds1, "Model"); } } DropDownList1.DataTextField = "MODEL_NAME"; DropDownList1.DataValueField = "MODEL_NAME"; DropDownList1.DataSource = ds1; DropDownList1.DataBind(); // DropDownList1.Attributes.Add("multiple", "multiple");
DropDownList1.Attributes.Add("multiple", "multiple");
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)