c# sharepoint client object model 创建列表库

ClientTools tools = new ClientTools();
ClientContext clientContext= tools.GetContext(OnlineSiteUrl, User, Pass, true); //false 本地 true ONline

Web web = clientContext.Site.OpenWeb("WebUrl");
clientContext.Load(web);
clientContext.ExecuteQuery();
clientContext.Dispose();

ListCreationInformation creationInfo = new ListCreationInformation();
creationInfo.Title = "Title";
creationInfo.Description = "Description";
creationInfo.TemplateType = 100;
//creationInfo.TemplateType = (Int32)ListTemplateType.GenericList;
web.Lists.Add(creationInfo);
clientContext.ExecuteQuery();

c# sharepoint client object model 创建列表库

上一篇:Centos6.5下Oracle 11g R2安装过程


下一篇:c# sharepoint client object model 创建文档库