I found this question which is a great starting point towards creating embedded widgets that enable showing dynamic content on remote sites (i.e. a different domain).
One problem I'm having is with the following code:
public ActionResult SomeAction()
{
return new JsonpResult
{
Data = new { Widget = "some partial html for the widget" }
};
}
It says Widget = "some partial html for the widget"
but this doesn't really mean anything to me. I assume that Widget
would contain the HTML representing what the user wants to see on the screen, but How do I get the contents of my Partial View into Widget
?
Can anyo开发者_运维知识库ne point me in the right direction? Thanks..
the solution to this issue exists here:
How to Render Partial View into a String
精彩评论