Код: Выделить всё
@Model.AttributoDescrizione
Javascript имеет следующий вид:
Код: Выделить всё
$('.attributoSelect2').select2({
placeholder: "Search attribute",
multiple: true,
allowClear: true,
minimumInputLength: 0,
ajax: {
dataType: 'json',
delay: 150,
url: "@Url.Action(MVC.Configurazione.Attributi.SearchAttrubutes())",
data: function (params) {
return {
search: params.term
};
},
processResults: function (data) {
return {
results: data.map(function (item) {
return {
id: item.Id,
text: item.Description
};
})
};
}
}
});
Код: Выделить всё
public string[] AttributiSelezionati { get; set; }
Код: Выделить всё
[HttpPost]
public virtual ActionResult Edit(EditViewModel model) { }
Подробнее здесь: https://stackoverflow.com/questions/536 ... or-and-mvc
Мобильная версия