FAQ Database Discussion Community


How create Dropdown list only using ViewBag in ASP.NET MVC 4?

asp.net-mvc-4,html-select,html.dropdownlistfor,viewbag
Here I have a model class.. public class MyDrop { public int id { get; set; } public string value { get; set; } } In my controller I use this code.... public ActionResult Index(){ var GenreLst = new List<MyDrop>(); MyDrop a = new MyDrop(); a.id = 1; a.value =...

Kendo dropdown with ng-options instead of DataSource

javascript,angularjs,kendo-ui,html-select,angular-directive
I've got a dropdown list defined using angular like this: <select class="form-control" ng-model="controller.selectedUser.superiorId" ng-options="superior.userId as superior.lastName + ' ' + superior.firstName for superior in controller.superiors | orderBy:['lastName', 'firstName']"></select> This works fine, however I want to show a little image next to the entries and so I'm trying to convert this...

Select default value of value to form field

javascript,html5,html-select
I have this page where there is a form with a drop-down list for options, then a dialog where you can change the details of the chosen option. I'm having trouble updating the dialog form (no default value) after having chosen an option from the drop-down list ( select tag)....

Html\CSS - unable to align custom Select tag along with a custom Checkbox

html,css,checkbox,html-select
I've created several custom checkboxes, where the first element is also a select element. I need all the elements to be in the same line, but in order to reduce the margin between each line I used line-height=something property, but this causes the text of the select element to be...

angular js : issue with html5 select

javascript,angularjs,html5,html-select
I came across this strange behavior today.. The same I found with one fiddle..(saved some time to explain the issue..) I have a fiddle here: http://jsfiddle.net/w9mQ8/2/ It demonstrates how to set a selected value in html select. Now, the strange thing in it.. The fiddle the result pane shows the...

Javascript jQuery - selecting select box option only works sometimes

javascript,php,jquery,html-select
the project is an MVC project writen in PHP I have an AJAX call in a veiw that echoes, into a div, a bit of Javascript that does some things on the page. At the end of the script is a piece of JQuery that should change a select boxes...

WTForms usage for dynamic options?

javascript,google-app-engine,html-select,wtforms
I use WTForms with Jinja2 in appengine and I have a dynamic option field where the available choices for a city depends on the choice of a region. Now I want to enable validation also for regions and cities (mainly if a user didn't select a region/city) but I don't...

What is the proper way to get the value of a React