Click here to Skip to main content
15,891,842 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
hi,

I have this Drop-down list at client side.
<asp:DropDownList ID="DropDownList1" runat="server" 
        onselectedindexchanged="DropDownList1_SelectedIndexChanged">
    </asp:DropDownList>


and on the server side.

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");




I want the feature like droppeddown = true property in VB.net

I tried "multiple" attribute, but it will only expand but won't drop down.


Thank you

What I have tried:

DropDownList1.Attributes.Add("multiple", "multiple");
Posted
Updated 16-Aug-17 0:38am

Try adding attribure multiple to DropDownList using DropDownList1 ClientId and jQuery after loading the page
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900