In a ASP.NET MVC View, what is the syntax to populate a Model using JQuery's $.getJSON
or $.ajax
?
The MVC code behind is written in C#.
For an MVC View is there something like? -
@model MyModel $.getJSON('@Url.Action("MyAction","MyController")/', function (dataReturned) { @model = dataReturned //put the data that is returned into the Model }