private bool EmailValidation(string email) { bool result = true; int adviserId = advisorVo.advisorId; try { if (advisorStaffBo.EmailduplicateCheck(adviserId, email)) { result = false; //lblPanDuplicate.Visible = true; ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "MyScript", "alert('Email already exists !!');", true); } } catch (BaseApplicationException Ex) { throw Ex; } catch (Exception Ex) { BaseApplicationException exBase = new BaseApplicationException(Ex.Message, Ex); NameValueCollection FunctionInfo = new NameValueCollection(); FunctionInfo.Add("Method", "AddStaff.ascx:Validation()"); object[] objects = new object[1]; objects[0] = result; FunctionInfo = exBase.AddObject(FunctionInfo, objects); exBase.AdditionalInformation = FunctionInfo; ExceptionManager.Publish(exBase); throw exBase; } return(result); }