The process of building custom solutions for SharePoint Server.
create a sharepoint online page based on custom template c#
Hi I have created a page template on SharePoint using this article https://petri.com/sharepoint-page-templates-have-finally-arrived-heres-how-to-use-them
Now I want to use it my c# code but I don't know-how
THANK YOU
using (var ctx = authMgr.GetSharePointOnlineAuthenticatedContextTenant(siteUrl, userName, password))
{
Web web = ctx.Web;
ctx.Load(web.Lists);
ctx.Load(web, w => w.SupportedUILanguageIds);
ctx.Load(web);
ctx.ExecuteQueryRetry();
//Create the Page
var page2 = ctx.Web.AddClientSidePage("PageWithSections.aspx",true); <------ STUCK HERE
page2.AddSection(CanvasSectionTemplate.TwoColumnRight, 5);
//page2.AddSection(CanvasSectionTemplate.TwoColumn, 10);
page2.Save();
Microsoft 365 and Office | SharePoint Server | Development
Developer technologies | C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
1 answer
Sort by: Most helpful
-
Deleted
This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.
Comments have been turned off. Learn more