• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 250
  • Last Modified:

Redirect Page from within Iframe

Hey there, I have a page with an iframe inside.  Within the IFrame page there is a button which I want to do a "Response.Redirect" in it's OnClick method, only problem is I want it to redirect the entire page instead of just the page within the iframe.  Is this possible? Thanks.
0
belikemike121
Asked:
belikemike121
  • 3
  • 3
1 Solution
 
pradeepsudharsanCommented:
document.frames.if1.location.href="webform1.aspx";
0
 
pradeepsudharsanCommented:
Hi,
sorry the previous one is wrong.
add the following script

<script language="javascript">
            function test()
            {
              window.open("MainForm.aspx");
            }
            
            </script>

<INPUT id="Button1" style="Z-INDEX: 103; LEFT: 312px; POSITION: absolute; TOP: 152px" type="button"
                        value="Button" name="Button1" onclick="test();">
This will display the full web form.

Regards
Pradeep
0
 
pradeepsudharsanCommented:
Hi,
prevoius one opens the new window.
window.open('MainForm.aspx','_parent'); -opens the form in the current window

Regards
Pradeep
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
belikemike121Author Commented:
the problem is I'm running a .NET script so I am using a .NET ImageButton control with a _Click method to capture its event.  I am running certain .NET code then after that executes i need it to redirect...
0
 
belikemike121Author Commented:
nvm, answered my own question, just doing a "Response.Write('<Script>')",....and so on...thanx
0
 
belikemike121Author Commented:
actually, problem with the script....it doesnt refresh, it will redirect but the page it redirects to is dynamic so it just displays whatever is in cache...doesnt actually display the right content, please help.
0

Featured Post

Prep for the ITIL® Foundation Certification Exam

December’s Course of the Month is now available! Enroll to learn ITIL® Foundation best practices for delivering IT services effectively and efficiently.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now