17,741
社区成员
发帖
与我相关
我的任务
分享
using (ClientContext clientContext = new ClientContext(SharePointSiteUrl))
{
clientContext.AuthenticationMode = ClientAuthenticationMode.FormsAuthentication;
clientContext.FormsAuthenticationLoginInfo = new FormsAuthenticationLoginInfo(SharePointSiteUser, SharePointSiteUserPassword);
Web oWebsite = clientContext.Web;
clientContext.Load(oWebsite.AllProperties);
try
{
clientContext.ExecuteQuery();
oWebsite.AllProperties[key] = value;
oWebsite.Update();
clientContext.ExecuteQuery();
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}