Wednesday, 3 August 2011

Use custom Error Page in SharePoint 2010 webpart


You can use your own Custom Error Page in SharePoint 2010 by replacing the Out-of-box Error.aspx page.

This is how you are going to replace the default error page with yours.

webApp.UpdateMappedPage(SPWebApplication.SPCustomPage.Error, “/_layouts/CustomErrorPage/CustomErrorPage.aspx”);

Make sure - CustomErrorPage.aspx  is deployed in _layouts folder

 To switch it back to default page

webApp.UpdateMappedPage(SPWebApplication.SPCustomPage.Error, null);

Ads by Google

No comments:

Post a Comment