【发布时间】:2014-12-16 19:11:49
【问题描述】:
我正在将 umbraco 中的某些数据类型的值获取到我在 cshtml 中的 MVC 视图中我在 JSON 中得到结果我将如何解析 JSON 以将其绑定到下拉列表。有什么可能的方法来做到这一点。我也在项目中安装了 NetonSoft JSON
if (home.GetProperty("residentsLogin") != null && !string.IsNullOrEmpty(home.GetPropertyValue("residentsLogin")))
{
var residentslog = home.GetPropertyValue("residentsLogin");
}
我的JSON是对应格式的
[
{
"name": "Property1",
"url": "http://www.google.com",
"target": "_blank",
"icon": "icon-link"
},
{
"name": "Property2",
"url": "http://www.google.com",
"target": "_blank",
"icon": "icon-link"
}
]
【问题讨论】:
-
分享您的研究对每个人都有帮助。告诉我们您尝试了什么以及为什么它不能满足您的需求。这表明您已经花时间尝试帮助自己,它使我们免于重复明显的答案,最重要的是它可以帮助您获得更具体和相关的答案!另见how to ask
-
ok 将更简短地编辑我的问题
标签: asp.net-mvc json asp.net-mvc-3 asp.net-mvc-4 json.net