0

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 JavaScript 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);
    }
Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Bardia
  • 393
  • 4
  • 11
  • Possible duplicate of *[Using Ext JS in ASP.NET](http://stackoverflow.com/questions/205720/using-extjs-in-asp-net)*. – Peter Mortensen Apr 23 '12 at 17:01
  • See: * *[Integration Ext JS and ASP.NET MVC](http://geekswithblogs.net/lszk/archive/2009/08/25/integration-extjs-and-asp.net-mvc.aspx)* * Stack Overflow question *[Using Ext JS in ASP.NET](http://stackoverflow.com/questions/205720/using-extjs-in-asp-net)* – user571646 Aug 20 '11 at 07:40

1 Answers1

0

You can use jQuery templates. An example is Introducing jQuery Templates 1: First Steps .

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Jayantha Lal Sirisena
  • 21,216
  • 11
  • 71
  • 92