var item = Sitecore.Context.Database.GetItem('xxx');
Now how can I get both its id and value? I've tried use item.Fields[""] , but only got an empty string, not sure why.
var item = Sitecore.Context.Database.GetItem('xxx');
Now how can I get both its id and value? I've tried use item.Fields[""] , but only got an empty string, not sure why.
Copyright © 2021 Jogjafile Inc.
What Sitecore field type you are using "Droplink" or "DropList".
Please see if below solution helps:
How to access the selected item in a Droplist in Code Behind?