2

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

1 Answer 1

3

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
Sign up to request clarification or add additional context in comments.

2 Comments

I think most people (AFAIK) would call \ backslash and / forward slash. +1 for the comment though
@Dolbz - you're probably right. I always get confused between the two :) [[editted]]

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.