开启在新视窗并且传入值
我从ClassOuery.aspx经由使用者点选去读取指定资料的资料库的档案实际路径请问我该怎么写才能让ClassView.aspx开启在新视窗并且传入strFilePath的值作为ClassView.aspx里面的路径?
ClassOuery.aspx
程序代码:
Protected Sub ListView2_ItemCommand(sender As Object, e As System.Web.UI.WebControls.ListViewCommandEventArgs) Handles ListView2.ItemCommand Dim hdfFileListNo As HiddenField = e.Item.FindControl("hdfFileListNo") Dim hdfFileListSubNo As HiddenField = e.Item.FindControl("hdfFileListSubNo") Dim hdfFileName As HiddenField = e.Item.FindControl("hdfFileName") Dim FileMemo As LinkButton = e.Item.FindControl("FileMemo") Dim strFilePath As String = ConfigurationManager.AppSettings(strCnnType & "BTA_FileMgn_Files").ToString & "\" & hdfFileListNo.Value & "\" & hdfFileListSubNo.Value & "\" & hdfFileName.Value & ".mp4" FileMemo.Attributes.Add("onclick", "void window.open('/bta/personal/ClassView.aspx?type=" & strFilePath & "') ") End Sub
ClassView.aspx
程序代码:
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Dim str as String = Request.QueryString("type") If Not IsPostBack Then If Request.QueryString("type") <> "" Then ...... End If End If End Sub