问题
I have a number of partial views that are used to render media in different formats (embedded video mainly). I now have a requirement that has me displaying these videos inside an iframe. Is there a way that I can return a minimal HTML page with the partial views embedded in it?
回答1:
Check out these discussion about how to render a partial view to string.
RenderPartial to String in ASP.NET MVC Beta
RenderPartial to string
来源:https://stackoverflow.com/questions/767722/asp-net-mvc-returning-partial-view-as-a-full-view-page