iframe

randy_belcher

Freshman
Joined
Dec 10, 2003
Messages
37
how can i redirect the main page url from a asp.net page that is contained within an iframe? if i use response.direct("newpage"), it just changes the page in the iframe. Thanks.

Randy
 
works like a charm! :) it took a little bit of code the way my project is setup, but all in all it works great. maybe someone else can use this code in their asp.net page. Thanks again for the help.


strRedirect = "parent.location.href='LoginAgentStats.aspx'"

' Form the script to be registered at client side for the Javascript "onClick" event.
Dim scriptString As String = "<script language=JavaScript> function Button1_onClick() {"
scriptString += strRedirect & ";}"
scriptString += "</script>"

If (Not Me.IsClientScriptBlockRegistered("Startup")) Then
Me.RegisterClientScriptBlock("Startup", scriptString)
End If

' Call the Button1_onClick function
Dim scriptString2 As String = "<script language=JavaScript> "
scriptString2 += "Button1_onClick();"
scriptString2 += "</script>"

If (Not Me.IsStartupScriptRegistered("CallNow")) Then
Me.RegisterStartupScript("CallNow", scriptString2)
End If
 
Back
Top