hai ,
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>
In the code behind I used one line code to add 'src' attribute to the iframe.
divIFrame.Attributes("src") = "..\Pages\Company.aspx"
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
Please help.
asked Mar 3, 2010 at 10:02
Vibin Jith
9313 gold badges16 silver badges34 bronze badges
1 Answer 1
You need to use forward slash / and not backslash \ in your URL.
divIFrame.Attributes("src") = "../Pages/Company.aspx"
Internet Explorer is quietly converting the slashes for you, masking a problem. Firefox correctly doesn't.
answered Mar 3, 2010 at 10:04
Dead account
20k13 gold badges54 silver badges82 bronze badges
Sign up to request clarification or add additional context in comments.
2 Comments
Dolbz
I think most people (AFAIK) would call \ backslash and / forward slash. +1 for the comment though
Dead account
@Dolbz - you're probably right. I always get confused between the two :) [[editted]]
default