I have a partial view that returns an HTML chunk of list items that gets appended onto an unordered list via an AJAX call. This all works fine.
However, once I receive the HTML back from the AJAX call, I would like to be able to set some properties on each of the list items via JQuery. In order to do that, I'm assuming that I need to receive the results of that AJAX call back as a JsonResult rather than a ActionResult. Unfortunately, I want to keep using the ASCX that I'm using to render the HTML since it has quite a bit of formatting data contained within it.
Is it possible to render a partial view and then convert it to a JsonResult for the AJAX client or is there a different approach that I should consider?
Any advice is much appreciated.
Thanks!