ASP.NET MVC返回管窥作为一个完整的视图页面 [英] ASP.NET MVC Returning Partial View as a full View Page

查看:149
本文介绍了ASP.NET MVC返回管窥作为一个完整的视图页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一些被用来渲染的媒体以不同的格式(嵌入式视频为主)部分景色。我现在有一个有我显示一个iframe中这些视频的要求。有没有办法,我可以嵌入了局部视图返回最小的HTML页面的方式?

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?

推荐答案

查看关于如何渲染字符串的局部视图这些讨论。

Check out these discussion about how to render a partial view to string.

的RenderPartial为String在ASP .NET MVC的测试

的RenderPartial字符串

这篇关于ASP.NET MVC返回管窥作为一个完整的视图页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆