@ HTML.DropDownListFor未显示选定的值 [英] @HTML.DropDownListFor is not showing selected value

查看:71
本文介绍了@ HTML.DropDownListFor未显示选定的值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我在模型中有列表。此列表中包含一个选定的值。



当我使用@ HTML.DropDownListFor时,它显示列表但是,它没有显示所选值。请帮忙。

解决方案

查看这篇文章并查看您的代码,您将获得成功

http://peternewhook.com/2013/02/asp-net-mvc-selectlist-selectedvalue-dropdownlistfor/ [< a href =http://peternewhook.com/2013/02/asp-net-mvc-selectlist-selectedvalue-dropdownlistfor/target =_ blanktitle =New Window> ^ ]

Hi,

I have list in Model. This list is having one selected value in it.

When I am using @HTML.DropDownListFor, it is showing me the list but, it is not showing the selected value. Please help.

解决方案

See this article and check your code you will get success
http://peternewhook.com/2013/02/asp-net-mvc-selectlist-selectedvalue-dropdownlistfor/[^]


这篇关于@ HTML.DropDownListFor未显示选定的值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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