Adding style for asp.net drop-down list control us

2019-04-21 07:30发布

问题:

I was trying to add style for asp.net drop-down list control using bootstrap 3. But it is not applying. Earlier it worked with bootstrap 2.3.2 without any changes.

Can anybody suggest me a way to do this. Many thanks.

回答1:

I would say this would be enough:

<asp:DropDownList runat="server" CssClass="form-control" ID="something" />

Take a look at bootstrap docs and scroll down to the Selects section.



回答2:

You can use this and change btn whatever you want: <asp:DropDownList Width="100%" CssClass="btn btn-default btn-sm" ID="DPCID" runat="server"/>