MVC*_*ate 4 iframe asp.net-mvc-3
我在提供IFrame src的路径时遇到问题.
我把我的html文件保存在同一个目录中.但我仍然没有得到它
我写的是这样的:
<iframe id="iframe" frameborder="0" src="Dancing.htm" style="width: 100%; height: 700px;"></iframe>
Run Code Online (Sandbox Code Playgroud)
但它没有找到资源给我错误但是如果我写一个视图(.cshtml)页面而不是HTM页面它正确加载我不是不知道为什么会发生这种情况
请帮我.
您必须在Views文件夹中找到*.html文件.
创建HTML文件夹并将Dancing.htm文件复制到该文件夹
/HTML/Dancing.htm
Run Code Online (Sandbox Code Playgroud)
<iframe id="iframe" frameborder="0" src="@Url.Content("~/HTML/Dancing.htm")" style="width: 100%; height: 700px;"></iframe>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
6102 次 |
| 最近记录: |