using Microsoft.SharePoint.Client;
using Microsoft.SharePoint.Client.WebParts;
namespace SampleCode
{
class AddWebPart
{
static void Main()
{
ClientContext oClientContext = new ClientContext("http://MyServer/sites/MySiteCollection");
File oFile = oClientContext.Web.GetFileByServerRelativeUrl("Default.aspx");
LimitedWebPartManager limitedWebPartManager = oFile.GetLimitedWebPartManager(PersonalizationScope.Shared);
string xmlWebPart = "" +
"
" xmlns=\"http://schemas.microsoft.com/WebPart/v2\">" +
"
"
"
"
"
"
"
"
"
"
"
"PublicKeyToken=94de0004b6e3fcc5
"
"
"
"
No comments:
Post a Comment
Thank you for Commenting Will reply soon ......