我是初学者啊,请教各位大哥大姐一个小问题,
我在一个.htm页面里调用一个.aspx页面,这个.aspx页面有个按钮,server.mappath("a.aspx"),链接到a.aspx页面,问题在于点击时是在.htm页面那个小小一块区域打开a.aspx页面啊,我想新开一个窗口来打开a.aspx页面,如何设置啊?是不是在server.mappath("a.aspx")加什么参数啊?
帮我啊,谢谢!!!
.htm里面是超连接吗?
把超连接的属性改为在新创口打开
可以自己写脚本,看看这个例子吧
Public Sub OpenWebFormInNewPage(ByVal NewPageUrl As String, _
ByVal NewPageWidth As Integer, _
ByVal NewPageHeight As Integer, _
Optional ByVal ShowToolBar As Boolean = False, _
Optional ByVal ShowLocation As Boolean = False, _
Optional ByVal ShowDirectories As Boolean = False, _
Optional ByVal ShowStatus As Boolean = False, _
Optional ByVal ShowMenubar As Boolean = False, _
Optional ByVal ShowScrollbars As Boolean = False, _
Optional ByVal IsResizable As Boolean = False, _
Optional ByVal TopDistance As Integer = 10, _
Optional ByVal LeftDistance As Integer = 10)
Dim FrmStates As New StringBuilder
If ShowToolBar Then
FrmStates.Append("'toolbar=yes, ")
Else
FrmStates.Append("'toolbar=no, ")
End If
If ShowLocation Then
FrmStates.Append("location=yes, ")
Else
FrmStates.Append("location=no, ")
End If
If ShowDirectories Then
FrmStates.Append("directories=yes, ")
Else
FrmStates.Append("directories=no, ")
End If
If ShowStatus Then
FrmStates.Append("states=yes, ")
Else
FrmStates.Append("stated=no, ")
End If
If ShowMenubar Then
FrmStates.Append("Menubar=yes, ")
Else
FrmStates.Append("menubar=no, ")
End If
If ShowScrollbars Then
FrmStates.Append("scrollbars=yes, ")
Else
FrmStates.Append("scrollbars=no, ")
End If
If IsResizable Then
FrmStates.Append("resizable=yes, ")
Else
FrmStates.Append("resizable=no, ")
End If
FrmStates.Append("top=" & TopDistance & ", ")
FrmStates.Append("left=" & LeftDistance & ", ")
FrmStates.Append("height=" & NewPageHeight & ", ")
FrmStates.Append("width=" & NewPageWidth & "'")
Page.RegisterStartupScript("OpenCustomFrm", "<script language='JavaScript'>window.open('" + NewPageUrl + "','_new'," & FrmStates.ToString & ");</script>")
End Sub