Click here to Skip to main content
15,917,481 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a page1(page1.aspx)and in page1 i have a frame, now when i click on button of page1 another page2(page.aspx) lode in iframe, now whan i click on button of page2, i want to reload page1... Now with my code when i do this, it loads in frame, but i want to load it in whole window i.e. like new form... can any one help me out??? Thnx in adv...
Posted

1 solution

Response.Redirect will redirect your IFrame. Instead use window.location to redirect your Main Window/Page.
C#
ClientScript.RegisterStartupScript(this.GetType(), "navigate", "window.location = 'Page1.aspx';", true); 
 
Share this answer
 
Comments
Naikniket 5-Nov-11 9:19am    
Thnx 4 repliyng, but it's not working, still it opens in frame...
Naikniket 5-Nov-11 9:22am    
hy i have solved it...

Me.Page.ClientScript.RegisterClientScriptBlock(Me.[GetType](), "myUniqueKey", "self.parent.location='page1.aspx';", True)
RaisKazi 5-Nov-11 10:07am    
Perfect! I should have suggested - "parent.location". Cheers

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900