Solved

Formating drop down in MVC

Posted on 2014-11-06
2
132 Views
Last Modified: 2014-11-10
I'm trying to format the following drop down in my MVC project with rounded edge. Please see screen shot.

I'm a little lost  on where to insert some css style and how to write it.

Drop Down...
That is my mvc code bellow:

  <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" })*@

            Department/Location: @Html.DropDownList("DeptList","All")
            @Html.TextBox("SearchString", ViewBag.CurrentFilter as String, new { style = "width:300px", @class = "form-control", placeholder = "Find by Last Name or First Name:" }) 

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

Open in new window

0
Comment
Question by:yguyon28
2 Comments
 
LVL 75

Accepted Solution

by:
käµfm³d   👽 earned 500 total points
ID: 40426224
Generally speaking, you wouldn't add style tags to your elements--you would add CSS rules to a stylesheet, and import that styleseet to the page (generally via a bundle). What look are you trying to achieve? Something similar to the textbox? If so, only a handful of the current browsers allow you to style a list/combo box. Usually IE is the offender, but perhaps the newest editions of IE let you. You may need to use an alternative form of listbox provided by JQuery or some other such library.
0
 

Author Comment

by:yguyon28
ID: 40426312
Yes something similar to the text box with rounded edge... I'm a lost on where to add the css and how to call it and what css to use.. Some help will be greatly appreciated....
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes relatively difficult and non-obvious issues that are likely to arise when creating COM class in Visual Studio and deploying it by professional MSI-authoring tools. It is assumed that the reader is already familiar with the cla…
More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

929 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

10 Experts available now in Live!

Get 1:1 Help Now