Link to home
Start Free TrialLog in
Avatar of Stacie
StacieFlag for United States of America

asked on

Drop Down with bootstrap can't format it... New help.

I have the following code and I'm not sure how to apply the bootstrap on the drop down.

Full code:
<div class="form-inline">
            Find by Last Name or First Name: @Html.TextBox("SearchString", ViewBag.CurrentFilter as String, new { style = "width:200px", @class = "form-control" })

            Location:

            @Html.DropDownList("LocationList", "All")

            <input type="submit" value="Search" class="btn btn-default" />
        </div>

Open in new window


Drop Down. Not sure what I have to modify here.

   @Html.DropDownList("LocationList", "All")

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Gary
Gary
Flag of Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Stacie

ASKER

Garry I followed your advice but I get this error.
@Html.DropDownList("LocationList", "All", new { @class="some-class-name" })

User generated image
Avatar of Stacie

ASKER

CS1928: 'System.Web.Mvc.HtmlHelper<PagedList.IPagedList<TweddlePhoneListApplication.Models.MasterList>>' does not contain a definition for 'DropDownList' and the best extension method overload 'System.Web.Mvc.Html.SelectExtensions.DropDownList(System.Web.Mvc.HtmlHelper, string, System.Collections.Generic.IEnumerable<System.Web.Mvc.SelectListItem>, object)' has some invalid arguments