c# sharepoint client object model 客户端如何创建中英文站点

ClientContext ClientValidate = tools.GetContext(OnlineSiteUrl, User, Pass, true);

Web oWebSite = ClientValidate.Web;
ClientValidate.Load(oWebSite);
ClientValidate.Load(oWebSite.Webs);
ClientValidate.ExecuteQuery();

//创建一个siteweb的站点

WebCreationInformation creation = new WebCreationInformation();

creation.Url = "siteweb";
creation.Title = "siteweb";
creation.Description = "siteweb";
creation.Language = 1033;  // 选择英语作为默认语言

//creation.Language = 2052;   // 选择中文作为默认语言
Web newWeb = oWebSite.Webs.Add(creation);

newWeb.IsMultilingual = false; //不勾选备用语言
//newWeb.AddSupportedUILanguage(1033); // English
//newWeb.AddSupportedUILanguage(1031); // German
//newWeb.AddSupportedUILanguage(1036); // French
//newWeb.AddSupportedUILanguage(1046); // Portugese (Brazil)
//newWeb.AddSupportedUILanguage(1049); // Russian
////newWeb.AddSupportedUILanguage(2052); // Chinese (Simplified)
//newWeb.AddSupportedUILanguage(3082); // Spanish
newWeb.Update();

ClientValidate.Load(newWeb);
ClientValidate.ExecuteQuery();

效果图如下:

c# sharepoint client object model 客户端如何创建中英文站点的更多相关文章

  1. 在C#开发中如何使用Client Object Model客户端代码获得SharePoint 网站、列表的权限情况

    自从人类学会了使用火,烤制的方式替代了人类的消化系统部分功能,从此人类的消化系统更加简单,加速了人脑的进化:自从SharePoint 2010开始有了Client Side Object Model ...

  2. SharePoint Client Object Model API 介绍以及工作原理解析

    CSOM和ServerAPI 的对比 SharePoint从2010开始引入了Client Object Model的API(后文中用CSOM来代替),从名字来看,我们可以简单的看出,该API是面向客 ...

  3. SharePoint 2010 匿名用户调用Client Object Model访问列表项

    最近有个小需求,在门户首页上加个通知公告的版块,新闻来源是列表项,需要有垂直滚动的效果. 第一个想法就是通过SharePoint的Client Object Model获取列表数据再加上JQuery来 ...

  4. 关于SharePoint 的Client object model该何时load和execut query的一点自己的看法

    很多人在用client object model的时候,不知道何时或者该不该load,今天看到一个观点描述这个问题,觉得很有道理,和大家分享.那就是写client object model就像写sql ...

  5. 解决在使用client object model的时候报“object does not belong to a list”错误

    在查看别人代码的时候,发现了个有意思的问题,使用client object model将一个文件check in 我使用的是如下语句获取file Microsoft.SharePoint.Client ...

  6. 记一个使用Client Object Model上传文件的小例子

    1. 新建一个C#的Console project. 2. 给project 添加reference: Microsoft.SharePoint.Client Microsoft.SharePoint ...

  7. [SharePoint]javascript client object model 获取lookup 类型的field的值,包括user类型(单人或者多人)的值。how to get the multiple user type/lookup type field value by Javascript client object model

    1. how to get value var context = new SP.ClientContext.get_current(); var web = context.get_web(); v ...

  8. 关于Metadata Client Object Model 的一些操作

    一.查询指定的Termset及子项 <script type="text/javascript" src="/Style%20Library/aaaa/Script ...

  9. Selenium的PO模式(Page Object Model)|(Selenium Webdriver For Python)

            研究Selenium + python 自动化测试有近两个月了,不能说非常熟练,起码对selenium自动化的执行有了深入的认识. 从最初无结构的代码,到类的使用,方法封装,从原始函数 ...

随机推荐

  1. oracle 如何快速删除两表非关联数据(脏数据)?

      1.情景展示 现在有两者表,表1中的主键id字段和表2的index_id相对应.如何删除两表非关联数据? 2.解决方案 --第1步 delete from VIRTUAL_CARD t where ...

  2. JDBC PreparedStatement Statement

    参考:预编译语句(Prepared Statements)介绍,以MySQL为例 1. 背景 本文重点讲述MySQL中的预编译语句并从MySQL的Connector/J源码出发讲述其在Java语言中相 ...

  3. linux查找历史命令

    1.ctr+r  输入搜索关键词 2.&history 3.上箭头翻看

  4. hutool JAVA 工具类

    https://hutool.cn/docs/#/ 入门和安装 A set of tools that keep Java sweet. -- 主页:https://hutool.cn/ | http ...

  5. allure与junit结合生成漂亮的demo

    1.allure安装 环境配置可参考https://blog.csdn.net/huggh/article/details/90905845,且博客中也分享了官网的案例https://github.c ...

  6. Sql server 中将数据行转列列转行(一)

    在做一些数据分析与数据展示时,经常会遇到行转列,列转行的需求,今天就来总结下: 在开始之前,先来创建一个临时表,并且写入一些测试数据: /* 第一步:创建临时表结构 */ CREATE TABLE # ...

  7. 【转】kettle7.1资源库无法打开,找不到connect按钮的问题处理

    转自:https://www.aboutyun.com/home.php?mod=space&uid=71645&do=blog&id=3535 kettle是一个比较好用的E ...

  8. php对数组遍历的两种方式示例

    在对 php 数组遍历时,一般经常使用 foreach 来遍历,很少用 while 来遍历,在下面的代码中作一个对比. <?php $content = ["ID" => ...

  9. node excel export包导致find函数被覆盖

    这个包确实是巨坑:https://github.com/functionscope/Node-Excel-Export 本来是想用来导出Excel的,没想到把Array的find函数能乱了.这种基础函 ...

  10. koa2 post请求ctx.request.body空获取不到的解决办法

    header请求头添加Content-type: application/json