IFRAME running .aspx page problems with postback

R

Richard St?en

Hi!

We are experiencing a problem with running an .aspx page inside an
iframe. The .aspx page is loading perfectly the first time (on load),
but when we try to interact/navigate within the .aspx page (press a
button/calendar control e.g.) the response is loaded in a new separate
browser window.

What we want is that the .aspx page is preserved and running inside
the IFRAME, not only on load, but also when the user tries to interact
with the page.

By the way, in the development environment we run the page in an frame
(not iframe), and this works fine.

Please help!
 
S

Steven Cheng[MSFT]

Hi richard,


Thank you for using MSDN Newsgroup! My name is Steven, and I'll be
assisting you on this issue.
From your description, you are using an iframe to contain a certain ASP.NET
web page. However, when you run the page and its container page, you found
that the page loaded correctly the first time, but it will be loaded in
another separate new browser window after posted back(fired some post back
in the page).
If there is anything I misunderstood, please feel free to let me know.

Based on my experience, the problem is probably caused by something
incorrect with the <iframe> element or
the certain page which is located in the iframe. Would you please confirm
the following items:

1. Does this problem occurs with the certain page(in the iframe), or also
occurs if replace the page with other pages? You may have a try build a
simple page and set it as the "src" of the iframe and see whether the
problem remains. Thus, we could assure whether the problem is due to the
page or the <iframe> or its container page.

2. Also, since open a page in a new separate window programmatically is
generally implemented using client side script such as javascript. You may
have a check on the certain page or its container page to see whether
there're some particular script blocks which may cause such behavior.

If you still feel puzzled with the problem, would you try creating a two
simple pages( just simpe enough to repro the issue) and provide me the page
code? Then, I'll try to do some further research on my side.

Please try the preceding suggestions. If you have any questions or have any
new findings, please feel free to let me know.


Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 
R

Richard St?en

Hi Steven, and thank you for your reply!

It seems to be some problems with the container page holding the
iframe-tag, I have created a separate testproject, where webform1.aspx
is containing the iframe-tag, pointing src to webform2.aspx.
webform2.aspx is containing a textbox and a button, and the
button-click event is setting the text in the textbox.

When running this project everything is working fine.

After digging into the containerpage-code where my actual problem is,
(the code is written by another division in my company), they are
dynamically setting the src of the iframe-tag. I assume that this
could be the source of the problem. I will confront this with them,
and try to solve the problem.

Thanks for the tip, Steven!

richard
 
S

Steven Cheng[MSFT]

Hi richard,


Thanks for your reponse. I'm glad that you've figured out the problem in
our issue. Hope you'll soon solved it.
Also, if you need any assistance, please feel free to let me know.


Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 
K

Kelly Leahy

Richard St?en said:
After digging into the containerpage-code where my actual problem is,
(the code is written by another division in my company), they are
dynamically setting the src of the iframe-tag. I assume that this
could be the source of the problem. I will confront this with them,
and try to solve the problem.

You may also want to make sure that your <FORM> tag in your ASPX page
doesn't have a "target" attribute (as doesn't the link that you're clicking,
if it's a linkbutton). This will cause a postback to occur in a different
window.

Kelly
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top