Wednesday, January 25, 2012

SharePoint Set the Value of a Yes/No Field in Code

C#


// Where "item" is of type SPItem
// how to read
bool result = Convert.ToBoolean(item["YesNoField"]);

// how to write
item["YesNoField"] = true;
item.Update();

No comments:

Post a Comment