【发布时间】:2014-02-11 01:09:58
【问题描述】:
正如我在主题中已经提到的,我有一个 MVC 站点,我需要禁用将其加载到 IFrame 中。
我为测试目的创建了一个简单的页面,并尝试将我的网站和 Google.com 加载到两个 IFrame 中。我可以看到我的网站已加载,但 Google 没有。这意味着有必要更改我的 MVC 站点中的某些内容。
<!DOCTYPE html>
<html>
<body>
<iframe src="http://localhost:61831/" width="1200" height="800">
<p>Your browser does not support iframes.</p>
</iframe>
<iframe src="http://google.com" width="1200" height="800">
<p>Your browser does not support iframes.</p>
</iframe>
</body>
</html>
那么我必须在 MVC 网站中写什么以及在哪里实现这一点?
【问题讨论】:
-
这就是您要找的吗? stackoverflow.com/questions/958997/…
-
@FelipeMiosso 不完全是,但还是谢谢你。
标签: asp.net-mvc asp.net-mvc-4 iframe