public JsonResult Checkmobile(string MobileNo, string previousnumber) { if (MobileNo == previousnumber) { return(Json(true, JsonRequestBehavior.AllowGet)); } bool check = Commonhelper.Checkmobile(MobileNo); if (check) { return(Json("Mobile no in use.", JsonRequestBehavior.AllowGet)); } else { return(Json(true, JsonRequestBehavior.AllowGet)); } }