1. Javascript, Jquery, undescore.js, mustache.js
Model:
public class Product
{
public string ProductName { get; set; }
public int Qnt { get; set; }
public List<Feature> Fetures { get; set; }
}
public class Feature
{
public int id { get; set; }
public double Weight { get; set; }
public string Color { get; set; }
public double Price { get; set; }
}
public ActionResult Data()
{
Models.Product p = new Models.Product
{
ProductName = "Cheese",
Price = 89.90,
Qnt = 2,
Fetures = new List<Models.Feature>
{ new Models.Feature{Color="Red", Weight=23.90},
new Models.Feature{Color="Blue", Weight=12.25}}
};
return Json(p, JsonRequestBehavior.AllowGet);
}
No comments:
Post a Comment