码迷,mamicode.com
首页 > Windows程序 > 详细

c# sharepoint client object model 创建文档库

时间:2020-05-26 12:10:07      阅读:98      评论:0      收藏:0      [点我收藏+]

标签:template   user   etc   share   mode   sha   stc   mat   lines   

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();

// Create the library
ListCreationInformation creationInfo = new ListCreationInformation();
creationInfo.Title = "LibraryName";
creationInfo.Description = "LibraryDescription";
creationInfo.TemplateType = 101;
//creationInfo.TemplateType = (Int32)ListTemplateType.DocumentLibrary;
web.Lists.Add(creationInfo);
clientContext.ExecuteQuery();

c# sharepoint client object model 创建文档库

标签:template   user   etc   share   mode   sha   stc   mat   lines   

原文地址:https://www.cnblogs.com/selenazhou/p/12964592.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!