Realizing Results

my personal notes on C#, SharePoint and object oriented programming

  Home  |   Contact  |   Syndication    |   Login
  7 Posts | 0 Stories | 2 Comments | 0 Trackbacks

News

Archives

About Me

below is the code snippet on how to update a field in sharepoint list which contains multiple chioce value

using(SPWeb oWebsite = SPContext.Current.Site.AllWebs["Site_Name"])
{
  SPList oList = oWebsite.Lists["listname"];
  SPListItem oListItem = oList.Items[0];

  oListItem["columnname"] = "choice1;#chioce2;#chioce3"
  oListItem.Update();
}

 

posted on Tuesday, August 31, 2010 4:38 PM