1

我有以下存储在数据库中

<iframe width="420" height="315" src="http://www.youtube.com/embed/mqSQvoinDE4" 
frameborder="0" allowfullscreen></iframe>

当我尝试使用@Html.Raw@Html.DisplayFor显示纯 HTML 而不是显示这个 iframe 时,它​​基本上是 youtube embed 。

我做错了什么?

4

1 回答 1

0

尝试在@Html.Raw 中使用它:

Server.HtmlDecode(Model.iFrameHTML)
于 2013-05-30T14:44:03.770 回答