Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

MVC 5 controller return json value to view

// mvc controller
 [HttpPost]
        public ActionResult IndChecking(string dta, string isChk)
        {
          /////
           return this.Json (new { Data = result, cKey = ContainerKey }, JsonRequestBehavior.AllowGet);
        }

// view
    success: function (result) {
          alert(result.cKey);
          
    }
 
PREVIOUS NEXT
Tagged: #MVC #controller #return #json #view
ADD COMMENT
Topic
Name
4+9 =