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.
To open the dropdown menu, use a button or a link with a class of . dropdown-toggle and the data-toggle="dropdown" attribute. The . caret class creates a caret arrow icon (), which indicates that the button is a dropdown.
By default, a dropdown menu is automatically positioned 100% from the top and along the left side of its parent. Add . dropdown-menu-right to a . dropdown-menu to right align the dropdown menu.
Since Bootstrap is all HTML, CSS and JavaScript, all open standards, you can use it with any framework including ASP.NET MVC. When you start a new MVC project, Bootstrap will be present, meaning you'll find Bootstrap. css and Bootstrap. js in your project.
Dropdowns are toggleable, contextual overlays for displaying lists of links and more. They're made interactive with the included Bootstrap dropdown JavaScript plugin. They're toggled by clicking, not by hovering; this is an intentional design decision.
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.
You can use this and change btn whatever you want:
<asp:DropDownList Width="100%" CssClass="btn btn-default btn-sm" ID="DPCID" runat="server"/>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With