KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
i am wondering if it is possible to return multiple objects with a JSON result in MVC. At the moment i have no problem to return a single object. public ActionResult AddToBasket(int quantity, int productdetailid) { // more code here return Json ( new { Name = p.Product.Name, Price = p.Price}); } This returns a single anonymous object in my ajax call.What i wanna do is return multiple Names and Prices to fill a table in my view. So basicly i wanna update(renew) the cookie every time the user adds a item to his basket and update the basket which is a html table. Thanks in advance.
Tags (comma-separated)
Save Edits
Cancel