mvc.net, ajax and partial view

Soldato
Joined
27 Mar 2003
Posts
2,710
Right starting to get my head around all this MVC'ness and am really enjoying it. After a few weeks of stumbling around it finally clicked and I am understanding it more and more. I have come up against an issue that I am wondering if anyone else has experienced.

I am currently using MVC.net V4 with Kendo UI (this has helped me a lot to move from webforms to MVC). So here is my scenario:

I have a view which when initially is loaded has a combobox and number of other areas hidden until a value is selected in the combobox.

Once a value is selected an ajax request is fired off to pull back the model as some JSON and then I use some javascript to apply the values to the relevant sections.

Now there is one section a pie chart (using telerik's dataviz) which I use in other areas of the website so I thought I would create it as a strongly typed partial view rather than copying and pasting the same bit over and over again. This partial view takes a list of class objects that provide all the data for the chart. So my question is how do I get the list of objects to the partial view from the JSON I have returned without having to call back to the server to re-get the same data.

If this makes no sense I will try and provide some code samples where I can to explain my point better if that helps.

Thanks in advance.
 
Back
Top Bottom