[MOSS] Update lookup field value

Update Lookup Field Value Using Client Object Module
代码
using (ClientContext mySPContext = new ClientContext("http://mossdev/"))
{
     Microsoft.SharePoint.Client.List oList 
= mySPContext.Web.Lists.GetByTitle("Items");

     Microsoft.SharePoint.Client.ListItem item 
= oList.GetItemById(1);
     item[
"Period"= "1;#Q2 FY09";  //[Lookup field Id];#[Lookup field Value]
     item.Update();
     mySPContext.ExecuteQuery();
 }

 

posted @ 2011-02-12 15:16  stefanie  阅读(153)  评论(0编辑  收藏  举报