从字段中获取名称/值在Sitecore 7中键入"名称查找值列表"

Sha*_*esh 0 sitecore namevaluecollection asp.net-mvc-3 sitecore7 sitecore7.1

我正在使用Sitecore 7.1.我使用了一个字段类型 "名称查找值列表".我希望在MVC中代码后面的字段类型中存储catch名称/值.如何捕获键值项.

Ahm*_*our 9

string keyValueRawValue = item["NameValueListFieldName"];
NameValueCollection nameValueCollection = Sitecore.Web.WebUtil.ParseUrlParameters(keyValueRawValue );

foreach (string key in nameValueCollection ) 
{
      var value = nv[key];
}
Run Code Online (Sandbox Code Playgroud)