I have a partial view in an ASP.NET MVC app:
@Html.Partial("_Comments", Model)
I want to make this partial a “plugin” that can be called from other apps. So, I created a separate action in my controller to return this partial view alone:
public ActionResult Embed()
{
return View("_Comments", new CommentsModel());
}
This action can then be accessed via the URL [root]/Comments/Embed and returns the partial view’s HTML.
Is there a clean way to embed the response from this URL in a separate MVC razor view (in an entirely different app)?
Thanks!
I found a solution.