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