public ActionResult CheckUserNameExists(string username) { bool UserExists = false; try { var nameexits = objIAccountData.Get_checkUsernameExits(username); if (string.Equals(nameexits, "1")) { UserExists = true; } else { UserExists = false; } return(Json(!UserExists, JsonRequestBehavior.AllowGet)); } catch (Exception) { return(Json(false, JsonRequestBehavior.AllowGet)); } }