Solved

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

Posted on 2014-10-23
3
145 Views
Last Modified: 2014-10-29
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

0
Comment
Question by:yguyon28
  • 2
3 Comments
 
LVL 58

Accepted Solution

by:
Gary earned 500 total points
Comment Utility
Apply Bootstrap to do what?

@Html.DropDownList("LocationList", "All", new { @class="some-class-name" })

Open in new window

0
 

Author Comment

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

I get this error
0
 

Author Comment

by:yguyon28
Comment Utility
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
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now