Questions tagged as 'dropdownlist'

2
answers

ASP .NET MVC 5 - DropDownList with ModelState?

I'm developing a registration system using MVC5 with DAO , however there were some doubts that I could not solve. I have a table where I register Projects and another where the types of Projects are: Table: Projects Fi...
asked by 21.08.2017 / 23:42
2
answers

Catch a selected item in Dropdownlistfor using an ASP.NET MVC ViewModel

I'm trying to register a Subcategory that needs a Category. I have the SubCategoryViewModel, where I created the public IEnumerable<CategoriaViewModel> Categorias { get; set; } and public Guid CategoriaId { get; set; } fields...
asked by 17.02.2017 / 01:06
2
answers

DropdownList with BeginCollectionItem

Good Night! I could follow in this same question here
asked by 01.05.2017 / 02:49
1
answer

@ Html.DropDownListFor how to set the default value

I need to set the default value displayed by a @Html.DropDownListFor Searching found: @ Html.DropDownListFor how to set default value So, I did it in my code: @Html.DropDownListFor(model => model.equipe, new SelectList(ViewB...
asked by 01.08.2017 / 13:59
1
answer

DropDownList filled in and selected

I need to fill in a @Html.DropDownList () with the parameters of my Model and pre select one of the items. In the Model I'm getting the complete package, being: Product list in Produto and items selected through MotivosRel . M...
asked by 17.03.2017 / 14:12
1
answer

There is no ViewData item of type 'IEnumerable' that has the key

I'm having a problem with the Employee Position that stays in a separate Table, when I try to create an employee selecting the position, it's the error ... but if I assign the position in the Controller (Ex: official.CargoID = 1) it works normal...
asked by 15.11.2016 / 23:53
1
answer

Set Value in an @ html.DropDownList

In a form for Address Book, I wanted to do the following. the guy types the zip, then fetches the zip, and returns the data to fill in the EditorFor. So good, it's working. City and States are in a separate table, and are displayed by DropDownLi...
asked by 18.11.2016 / 14:33
1
answer

Edit data from a DropDown List in Excel

I have a list of items in a dropdown in excel. These values must be selected by the user and from there, edit them as requested. However, I do not know how to edit these dropdown values. Can someone help me? Below is an example of two items that...
asked by 01.12.2017 / 12:01
1
answer

ASP.NET - Access DropDownList item attribute in Code Behind

I have a DropDownList in which I add items as below: var item= new ListItem("Texto do Item", "Valor do Item"); item.Attributes.Add("NomeAtributo", "ValorAtributo"); The DropDownList is rendered on the screen with the attribute...
asked by 06.04.2017 / 20:43
1
answer

Upload a json into a DropDownList Yii2

I recently migrated to the YII 2 framework. And I have one small question: I have a json that I need to pop a DropDownList. The Json file: [ {"codigo": "05", "descricao" : "Administrador"}, {"codigo": "10", "descricao" : "Diretor"}, {"codigo":...
asked by 01.11.2018 / 20:09