I have a number of cascading drop down boxes that allow users to filter data before it is shown to them. I have done this using JQuery and returning a lists with JsonResults. But on the final drop down box change I would like to retrieve the data that matches the filters they have applied and display this in a table.
To render the table I would like to use the Model and the htmlhelpers built into MVC. I am unsure of how (or if it is possible) to get this data into the model without making it post back the page (and losing the data from the cascading drop downs). What I would like is to somehow update the model from Jquery, which will allow me to send the data back as a Jsonresult the dynamically create the table.
Any ideas?
Cheers
In addition to getting results back via JSON, you can also return partial views from your controller:
There are ways to create a JSON object to pass back to your controller, but this should be enough to get you started.
In your controller: