Hi @Yuvraj Patil
As far as I know, there is no such property to distingush site page, wiki page, web part page. Per my test, the content type of web part page is Document
and which in site page and wiki page is Site Page
. And in wiki page, field CanvasContent1
must be null. So we can determine wiki page and site page by CanvasContent1
Please refer to following code
ListItem item = ctx.Web.Lists.GetByTitle("Site Pages").GetItemById(97);
ctx.Load(item);
ctx.Load(item.ContentType);
ctx.ExecuteQuery();
if ("Document" == item.ContentType.Name) {
Console.WriteLine("web part page");
}
else if ("" != item["CanvasContent1"] && null != item["CanvasContent1"]) {
Console.WriteLine("Site page");
}
else {
Console.WriteLine("Wiki page");
}
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.