Toolpart Save Exception

27/09/2012 21:20

 

//Validation in custom Toolpart can be done by firing exception in override ApplyChanges method of Toolpart.
 
if(string.IsNullOrEmpty(this.txbConfirmationPageUrl.Text))
{

    throw new Microsoft.SharePoint.WebPartPages.WebPartPageUserException("Custom property is required");

}