Friday 14 March 2014

On Exception/Success time move Success or Error Message page in share point 2010

  • Add the following Namespace.
     
    • using Microsoft.SharePoint.Utilities;
  • Replace the code for btnSuccess_Click event with the following
    SPUtility.TransferToSuccessPage("Operation Completed Successfully");
     
  • Replace the code for btnError_Click event with the following
    or 
       Try - Catch Exception
       Exception ex = new Exception("Operation Failed - Contact to Your Administrator.");
       SPUtility.TransferToErrorPage(ex.Message);
 

  • Build and deploy the solution.

No comments:

Post a Comment