TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Doniyor Niazov
NA
72
768
How to get ListItem of the page in c#
Aug 25 2016 7:26 AM
So I found a code to edit a sharepoint page programmatically.<br /><br /> public static bool EditPage(SPClient.ListItem item, string pageTitle, string pageContent, string publishComment)<br /> {<br /> var pageEdited = false;<br /> try<br /> {<br /> item["Title"] = pageTitle;<br /> item["PublishingPageContent"] = pageContent;<br /> item.Update();<br /> SharePointTools.ClientContext.ExecuteQuery();<br /> item.File.Publish(publishComment); <br /> SharePointTools.ClientContext.ExecuteQuery();<br /> pageEdited = true;<br /> }<br /> catch (Exception ex)<br /> {<br /> pageEdited = false;<br /> }<br /> return pageEdited;<br /><div> }</div><div> </div>So I got all my pages and how I can get an `SPClient.ListItem item` of every page.
Reply
Answers (
1
)
Custom Advance Search page in Sharepoint
SharePoint Webpart display two times in aspx page