Dec 08 2021 10:53 PM - edited Dec 08 2021 10:57 PM
Hi,
I am trying to execute this code in the new Pnp.core framework because I would like to insert a client side text to a page. So, I found this code in a demostration from the old OfficeDevPnP.Core:
using var clientContext = await _httpClientFactory.CreateSharePointClientContext(siteUrl);
var page = clientContext.Web.AddClientSidePage(pageUrl + ".aspx", true);
page.AddSection(CanvasSectionTemplate.OneColumn, 0);
page.Save();
//page.AddControl
var section = page.Sections[0];
var pageConent = new CientSideText() { Text = text };
page.AddControl(pageConent, section, 0);
page.Save();
page.Publish();
For some reason, I got an error on line 12:
So, I wa swondering if there is a new method to achieve this or Is there any way to add client side text to a page using these methods?
Thank you!
Jose Luis