【问题标题】:Sitecore how to get a Droplist or Droplink selected item's both Id and Value?Sitecore 如何获取 Droplist 或 Droplink 选定项目的 Id 和 Value?
【发布时间】:2020-05-08 02:27:40
【问题描述】:
var item = Sitecore.Context.Database.GetItem('xxx'); 

现在我怎样才能同时获得它的 id 和 value?我试过使用 item.Fields[""] ,但只有一个空字符串,不知道为什么。

【问题讨论】:

标签: sitecore sitecore8.2


【解决方案1】:

您使用的是什么 Sitecore 字段类型“Droplink”或“DropList”。

请查看以下解决方案是否有帮助:

How to access the selected item in a Droplist in Code Behind?

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2018-06-13
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多