.Net or Browser issue?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I suspect that this problem is a browser issue but just want to get some
opinions. I have an iframe with a submit button. If I click the submit
button, I get an event for the button and at the end of the event, I
Response.Redirect(parent). The parent then get !Page.IsPostBack and I
recreate the parent screen. Everything works the way it should.

Now the problem is that I put a submit button on the parent and performed a
javascript {parent.frames[0].document.forms[0].submit();} on click of the
parent button. The event occurs normally in the iframe and at the end of the
event I Response.Redirect(parent) but the redirect does not occur. If I step
through the code, I can see that the redirect never takes place.

Normally I want to recreate the parent page after that event so I tried to
Response.Redirect(myself) from the parent event when the submit button was
clicked but a race condition occurs and the data from the iframe may or may
not get submitted. So this is not a solution.

So what do you think? Is Response.Redirect() not performed by the browser
when a submit is performed by the parent or is this a .Net issue?
 
After investigating the problem further, there appears to be a workaround for
the problem. The problem appears to be a .Net issue and not a browser issue.
The things that occur with the problem is that I can't redirect from the
event handler in the iframe and also the RegisterStartupScript() gets lost
in the parent window when the submit is trigered from the parent javascript.
So I hardcoded the javascript in the parent so it doesn't get lost. Secondly,
if a redirection must be done to display an error message or for any other
reason, I then set a Session variable in the event handler and then process
that redirection when I get the !Page.IsPostBack in the iframe.
 
Back
Top