JS 来完成跳转 Private Sub LinkButton1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LinkButton1.Click Dim strtmp As String Dim strkeyword As String Dim typeid As Integer strkeyword = Trim(txtkeyword.Text) typeid = DDLClass.SelectedIndex strtmp = "<script language=javascript>parent.main.location.href='searchfiles.aspx?word=" & strkeyword & "&typeid=" & typeid & "'" & " ;</script>" Response.Write(strtmp) End Sub
在点击中加入Tartget="left"
这样链接出来的页面就会到目标位置了
Target="left"
Response.Redirect("gridview.aspx?target=right");是OK的!
楼上说得没试验过,学习一下我的写法是这样的,你做点击操作的框架页写上<base target=你的目标框架名>就可以跳转到合适的地方了
缺点是,整个页面所有其他的跳转也都这样生效了。
Dim strtmp As String
Dim strkeyword As String
Dim typeid As Integer
strkeyword = Trim(txtkeyword.Text)
typeid = DDLClass.SelectedIndex
strtmp = "<script language=javascript>parent.main.location.href='searchfiles.aspx?word=" & strkeyword & "&typeid=" & typeid & "'" & " ;</script>"
Response.Write(strtmp) End Sub