jhunsi Posted September 24, 2012 Posted September 24, 2012 (edited) I am trying to get an iframe to open in a new window when I click on the item in the datatable. All I can get it to do right now is open on the same page. Code is below. Private Sub gvJobs_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles gvJobs.SelectedIndexChanged Dim mySelection As String = gvJobs.DataKeys(gvJobs.SelectedIndex).Value.ToString Dim mySite = New SPSite(sSite) Dim myWeb As SPWeb = mySite.OpenWeb() Dim myList As SPList Dim dtTable As DataTable Dim myView As DataView Dim myPath As String myList = myWeb.Lists("Jobs") dtTable = myList.Items.GetDataTable myView = dtTable.DefaultView myView.RowFilter = "ID = '" & mySelection & "'" myPath = sSite & "Jobs/" & myView.Item(0)("LinkFileName").ToString frame1 = CType(Me.FindControl("DocViewer"), HtmlControl) frame1.Attributes("src") = myPath lblName.Text = myView.Item(0)("Position").ToString lblPosition.Text = myView.Item(0)("Position").ToString pnlDoc.Visible = False pnlList.Visible = False pnlApply.Visible = True pnlQ1.Visible = True pnlQ2.Visible = False pnlQ3.Visible = False pnlQ4.Visible = False pnlQ5.Visible = False pnlQ6.Visible = False pnlQ7.Visible = False pnlQ8.Visible = False pnlQ9.Visible = False pnlQ10.Visible = False radType.SelectedIndex = -1 End Sub Edited September 24, 2012 by snarfblam Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.