programatically redirect to custom error page
To set a custom error page
const string CustomErrorPage = "/_layouts/CustomPageMappings/Error.aspx"; webApp.UpdateMappedPage(SPWebApplication.SPCustomPage.Error, CustomErrorPage);
ref:
http://todd-carter.com/post/2010/04/07/An-Probable-Error-Has-Occurred.aspx
To call the error page ( custom or defaulting )
You can use the SPUtility.TransferToErrorPage method in any Web Part or custom code
try
{
//Code that force cause an exception
}
catch (Exception ex)
{
SPUtility.TransferToErrorPage(ex.Message);
}
Check it out:SharePoint 2010








![Norton Antivirus 2012 - 5 Users [Download]](http://ecx.images-amazon.com/images/I/51qXFK%2BagIL._SL160_.jpg)
Answers Rating