DropDown不在视野中 [英] DropDown not laoding in view

查看:66
本文介绍了DropDown不在视野中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我在视图中有下拉菜单

Hi,,

i have dropdown in view

@Html.DropDownListFor(m => m.Education, new SelectList(Model.Education_list, "ID", "Name"), "Select", new { id = "ddedu", style = "width:300px" })




对于下拉菜单,我确实在控制器中进行了调试,并注意到该列表"Education_list"加载得很好,但是当控制器返回查看时,出现了错误对象引用未设置为对象实例".但我在清单中很有价值

请有人帮我.




for dropdown am loading in controller i did debug and noticed that this list "Education_list" loading well but when controller returns to view am getting error "Object reference not set to an instance of an object." but i have value in my list

please some one help me.

推荐答案

您的代码是否包含@ Html.DropDownListFor .....通常,您的内嵌include应该以=开头,因此应该为= HTML ....
Does your code contain @Html.DropDownListFor..... Normally your in line include should start with = so it should be =Html....


这篇关于DropDown不在视野中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆