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

Popular posts from this blog

formatting - SAS SQL Datepart function returning odd values -

c++ - Apple Mach-O Linker Error(Duplicate Symbols For Architecture armv7) -

php - Yii 2: Unable to find a class into the extension 'yii2-admin' -