Chris,
The source of your problem here is that IFRAMES aren't really a feature of
Server Side ASP.Net Code. Basically, if the result of your server side code
(which i assume is in an iframe) needs to directly affect the iframes of the
parent page, then you need to pass an indication back to the client side,
indicating that you wish to alter the pages displayed in your iframes.
The way i do it is as follows; I run the server side code, and then place a
value in an ASP.Net text box which has a style tag "DISPLAY:None" (so that
the end user doesn't see it).
In javascript, Create a client-side window.onload event. In the
window.onload event, I check to see if the textbox contains a value using
code similar to the following:
if(Form1.txtTextBox.value.length > 0){
//redirect banner left to other page
window.parent.frames(1).location.href = "otherpage.aspx";
//redirect banner right to other page
window.parent.frames(2).location.href = "anotherpage.aspx";
}
Basically, you need to give your aspx page some server-side indication of
what it is meant to be doing; eg, Telling it that it needs to redirect other
frames to other pages.
Hope this is of help to you.
m00nm0nkey !!!
"Chris Podmore" wrote:
This is driving me mad so any help will be much appreciated.
I have an html page with 3 frames, banner, left and right. The banner frames
source is an aspx page. The aspx page has two buttons, both need to run some
code and then redirect the user somewhere else. The problem is the redirected
page is being displayed in the banner frame. How do I tell either
Response.Redirect or Server.Transfer what frame to display the page in or
that the redirected page isn’t to be displayed in any of the frames?
Thanks for any help.
Chris.