Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Calling MVC controller from Javascript ajax

public class AjaxTestController : Controller
{
    //
    // GET: /AjaxTest/
    public ActionResult Index()
    {
        return View();
    }

    public ActionResult FirstAjax()
    {
        return Json("chamara", JsonRequestBehavior.AllowGet);
    }   
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #Calling #MVC #controller #Javascript #ajax
ADD COMMENT
Topic
Name
3+8 =