When working with server-side event receivers, I use the below code to check if a wiki page exists inside our "Pages" library or not, using GetFile() + SPFile.Exists:-

DataTable currentTempletePages = properties.Site.RootWeb.GetList(properties.Site.RootWeb.ServerRelativeUrl + templatelisturl).Items.GetDataTable();

foreach (DataRow tempPagename in currentTempletePages.Rows)//check if any of the pages already exsits..
SPFile tempWikiPage = properties.Site.RootWeb.GetFile("/kb/CustomerServiceKB/pages/" + newPageName + ".aspx");

                            if (tempWikiPage.Exists)

But inside SharePoint Client Object Module (CSOM), what are the approaches to do the same steps? as i want to migrate my above server-side event receiver to be inside a client-side remote event reliever.. but i can not find an object named SPFile inside CSOM ... so can anyone advice?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.