/// <summary> /// Shows exception message on the UI /// </summary> /// <param name="validationResults">Validation results.</param> /// <param name="p">Variable no of objects.</param> public void Handle(ValidationResultCollection validationResults, params object[] p) { Page page = HttpContext.Current.Handler as Page; if (page == null) return; var control = ControlHelper.Find<UserControl>(page, "ExceptionControl"); if (control != null) control.Visible = true; Label l = ControlHelper.Find<Label>(page, "lblException"); if (l != null) l.Text = validationResults.ToArray().ConvertToString("<br>"); }