Exemplo n.º 1
0
        public JsonResult GetStatesbyCountry(StatesModel sm)
        {
            var res = "";

            try
            {
                string jsr = mps.GetStatesbyCountry(sm);
                return(Json((new JavaScriptSerializer()).DeserializeObject(jsr), JsonRequestBehavior.AllowGet));
            }
            catch (Exception ex)
            {
                res = ex.Message.ToString();
                return(Json(res, JsonRequestBehavior.AllowGet));
            }
        }