c# - MVC 5 select list issues -
c# - MVC 5 select list issues -
i have got number of problems:
why
<select id="setlang" data-bind="options: languagesettingex, optionstext: 'settedlanguage', optionsvalue: 'slid' "> </select>
but
@html.dropdownlistfor(m => m.selectedlanguagesettingex, (selectlist)model.languagesettingitemsex, new { id = "slid", data_bind = " options: languagesettingex, optionstext: 'settedlanguage', optionsvalue: 'slid'" })
this model
public class langviewmodel { public string selectedlanguagesettingex { get; set; } public selectlist languagesettingitemsex { get; set; } }
in using knockout read values , bind list, works in normal select, have got same type of way on application on fails.
gives me error
there no viewdata item of type 'ienumerable' has key 'selectedlanguagesettingex'.
this knoutout.js bound json object
i want either bind phone call on controller, or set session variable
c# asp.net-mvc asp.net-mvc-5
Comments
Post a Comment