【发布时间】:2020-05-08 02:27:40
【问题描述】:
var item = Sitecore.Context.Database.GetItem('xxx');
现在我怎样才能同时获得它的 id 和 value?我试过使用 item.Fields[""] ,但只有一个空字符串,不知道为什么。
【问题讨论】:
标签: sitecore sitecore8.2
var item = Sitecore.Context.Database.GetItem('xxx');
现在我怎样才能同时获得它的 id 和 value?我试过使用 item.Fields[""] ,但只有一个空字符串,不知道为什么。
【问题讨论】:
标签: sitecore sitecore8.2
您使用的是什么 Sitecore 字段类型“Droplink”或“DropList”。
请查看以下解决方案是否有帮助:
How to access the selected item in a Droplist in Code Behind?
【讨论】: