Solved

Formating drop down in MVC

Posted on 2014-11-06
2
130 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 74

Accepted Solution

by:
käµfm³d   👽 earned 500 total points
Comment Utility
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
Comment Utility
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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
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.

772 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