Digging into Microsoft Office SharePoint Server 2007 (MOSS 2007), Windows SharePoint Services (WSS) v3.0, Windows Workflow Foundation (WF), Microsoft Dynamics CRM, and InfoPath 2007.
Tuesday, December 4, 2007
Redirecting to an Error Page
The SPUtility.TransferToErrorPage method is a convenient way to redirect users to an error page in the event that an unhandled exception occurs. This post (from Wellington no less!) covers this method and a few other static methods from the SPUtility class well. One thing worth pointing out is the use of the second overload to the TransferToErrorPage method. This allows a link to appear in the message so that users can be redirected to another page (for example to a long running job status list item for more information on the error). To use this override, pass the link text and link url and then include a '{0}' (like the composite format syntax) in your message where you need the link to appear.
No comments:
Post a Comment