【发布时间】:2015-01-16 02:49:47
【问题描述】:
我想知道是否可以得到一些帮助,我正在服务器端为网格中的每一行创建超链接。 问题是如何将其设置为在单击超链接时在新窗口或新选项卡中打开。 请帮我修改我的代码,以便它可以在新窗口/新标签中打开。
Protected Function GenerateReportLink(ByVal inputVal)
Dim output As String = ""
Try
Dim svcs As New SystemServices
' Check for null values
If Not inputVal Is Nothing And Not String.IsNullOrEmpty(inputVal) Then
Dim URL As String = Nothing
URL = (String.Format("https://www.test.com/cgis/{0}/Reports/ShortReport.asp?/SessionID={1}&IncidentID={2}", m_User.CompanyCode, m_SessionID, m_IncidentCaseID.ToString()))
output = "<a href='" + URL + "'>Report</a>"
End If
Catch
End Try
Return output
End Function
【问题讨论】: