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


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

    效果图如下:

  • 相关阅读:
    Bootstrap 4 网格的基本结构
    Js 框架之Vue .JS学习记录 ① 与Vue 初识
    ASP.NET 发送邮件 SMTP
    c# 多线程简化
    ASP.NET Razor
    ASP.NET MVC 简单介绍①
    握手7
    握手6
    握手5
    握手4
  • 原文地址:https://www.cnblogs.com/selenazhou/p/11593629.html
Copyright © 2020-2023  润新知