使用iframe调用我的aspx页面到html页面,怎么做?

时间:2012-08-17 06:49:03

标签: asp.net html

我在html

中提供iframe代码时出错
<iframe  runat="server" src="~/Contactus.aspx" style="width: 840px; height: 233px"></iframe>

正确地给出了src路径。但它显示错误:

  '/'应用程序中的服务器错误。无法找到该资源。   描述:HTTP 404.您正在寻找的资源(或其中一个   依赖项)可能已被删除,其名称已更改,或者是   暂时不可用。请查看以下网址并制作   确保它拼写正确。   请求的URL:/联系我们/〜/ Contactus.aspx

1 个答案:

答案 0 :(得分:1)

查看返回的错误:Requested URL: /contact us/~/Contactus.aspx

尝试将代码修改为:

<iframe  runat="server" src="Contactus.aspx" style="width: 840px; height: 233px"></iframe>