我有IFrame的问题 [英] I have a problem with IFrame
本文介绍了我有IFrame的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有显示动态页面一个iFrame在我的网页。
I have an iFrame for display dynamic pages in my page.
<iframe id="divIFrame" scrolling="no" runat ="server" src="Login.aspx" frameborder="0"
style="width: 575px; height:323px; padding:0px;z-index:0px;" >
</iframe>
在code后面我用一条线code以添加SRC属性的iframe。
In the code behind I used one line code to add 'src' attribute to the iframe.
divIFrame.Attributes("src") = "..\Pages\Company.aspx"
这是在IE A和克罗默而不是在Mozila firefox.It作品显示了如下的错误
it's works in IE aand crome but Not in Mozila firefox.It shows an Error Like this
Server Error in '/' Application.
HTTP Error 400 - Bad Request.
Version Information: ASP.NET Development Server 9.0.0.0
请帮忙。
推荐答案
您需要使用斜杠(/)而不是反斜杠\\你的网址。
You need to use forward slash / and not backslash \ in your URL.
divIFrame.Attributes("src") = "../Pages/Company.aspx"
Internet Explorer正在悄然转换斜线你,掩盖了问题。正确的Firefox没有。
Internet Explorer is quietly converting the slashes for you, masking a problem. Firefox correctly doesn't.
这篇关于我有IFrame的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文