With client-side code, such as top.<target>.location.href= ...
ASP is on the server and does not "see" framesets.
Instead of response.redirect, use code like this:
<% url = "http://wherever.com/" response.write("<script>" & vbCrLf) response.write("parent.framename.location.replace('" & url & "');") response.write(vbCrLf & "</script>") %> |
Or this:
<% url = "http://wherever.com/" response.write("<script>" & vbCrLf) response.write("parent.framename.location.href='" & url & "';") response.write(vbCrLf & "</script>") %> |
I prefer the replace() function because it doesn't muck up the history list.
If you want to open a new window, you can use:
<% url = "http://wherever.com/" response.write("<script>" & vbCrLf) response.write("window.open('" & url & "');" & vbCrLf) response.write("</script>") %> |
If it is a form you're submitting to, you can use the following (either for a frame or a new window):
<% url = "http://wherever.com/" dest = "<form method=post action='" & url & "' target=framename>" ' for a new window: 'dest = "<form method=post action='" & url & "' target=_blank>" response.write(dest) %> |