| 
 
|  | To improves our performance please Like Share Subscribe(Will boost us) |  |  |  |  |  | How to delete sitepage and check exists or not in sharepoint Question Posted on 08 Mar 2014
 
 Home >> SharePoint >> SharePoint SourceCode >> How to delete sitepage and check exists or not in sharepoint
 | 
 
 |  | Below is the code for check file is-exists or not if exists then delete the file 
 
 SPWeb site=SPContext.Current.Web;
 SPFIle sitePage=site.GetFile("filename.aspx")
 if(sitePage.Exists)
 {
 sitePage.Delete();
 }
 
 |  |  | 
 
 |