If you want to change the name of the page from the web page on the page, for example, you can use this:
private void ChangeTitle(string newTitle) { SPListItem item = SPContext.Current.ListItem; if (item != null) { item[SPBuiltInFieldId.Title] = newTitle; item.SystemUpdate(false); } }
This will only work for a page in the page library, because there is no linked list on the default.aspx page in the root directory of your site. Also, do not forget to refresh the page after changing the name.
SystemUpdate ensures that the βmodified / changedβ information is not updated and the version number does not increase. If you want this information to be updated, replace it with item.Update ();
Tom vervoort
source share