I have a droplist field in Item. Its source is of a folder where 2 items present named Yes and No. When the droplist field is clicked 2 options comes up. I want to edit the field through Code i am doing below:
sampleItem.Fields["DroplIst Field Name"].Value = "Value to be saved in droplist";
It updates the field , But when I try saving the Item it throws error as "The field contains a value that is not in the selection list.". How can i select the item from selection list through Code?