KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I have the following code: public ActionResult SomeAction() { return new JsonpResult { Data = new { Widget = "some partial html for the widget" } }; } I'd like to modify it so that I could have public ActionResult SomeAction() { // will render HTML that I can pass to the JSONP result to return. var partial = RenderPartial(viewModel); return new JsonpResult { Data = new { Widget = partial } }; } is this possible? Could somebody explain how? note , I edited the question before posting the solution.
Tags (comma-separated)
Save Edits
Cancel