Let’s see, How to restore particular version document in SharePoint document library.
private void RestoreDocument(){try{DialogResult dr = MessageBox.Show("you are about to replace the current version with the selected version?", "Message", MessageBoxButtons.YesNo, MessageBoxIcon.Question);if (dr == DialogResult.Yes){SPSite Site = new SPSite(URL);using (SPWeb web = Site.OpenWeb()){SPList list = web.Lists[DocLibrary];SPListItem item = list.GetItemById(DocID);item.Versions.RestoreByID(selectedversionID);MessageBox.Show("Document version has been successfully restored.", "Message");}}}catch (Exception ex){MessageBox.Show(ex.Message, "Message");return;}}
Tool which is capable to recover all data from corrupt SharePoint database & restore your SharePoint database instantly. For more information about this tool, visit here:- http://www.filesrecoverytool.com/sharepoint-database-repair.html
ReplyDelete