How can I handle a JSON result in JavaScript (on MVC)?
I'm using Ext in a MVC project. I wrote a controller, like the code below. How do I handle this JSON reult in my JavaSc开发者_如何学Cript used in my View page?
public ActionResult Index()
{
List<PriceList> newList = new List<PriceList>
{
new PriceList { Number = 1, Price = 24},
new PriceList { Number = 2, Price = 25},
new PriceList { Number = 3, Price = 20},
new PriceList { Number = 4, Price = 18},
};
return Json(newList);
}
You can use jQuery templates. An example is Introducing jQuery Templates 1: First Steps .
精彩评论