Hi, I am using the following vb.net code to populate a submenu item (which works properly) but it does not open a link in a new tab. How do I do this using target=_blank ?
Dim oMenuItem As Syncfusion.JavaScript.Web.MenuItem
mnuLinks.Items.Clear()
conn.ConnectionString = AccessConnect
conn.Open()
myCommand.Connection = conn
sSql = "SELECT * FROM Links"
myCommand.CommandText = sSql
myReader = myCommand.ExecuteReader
If myReader.HasRows Then
While myReader.Read()
oMenuItem = New Syncfusion.JavaScript.Web.MenuItem
oMenuItem.Text = myReader.Item(2).ToString
oMenuItem.Url = myReader.Item(1).ToString
oMenuItem.HtmlAttributes = ""
'oMenuItem.LinkAttributes.Insert(0, "target=_blank") <--- this does not work so is commented out
mnuLinks.Items.Add(oMenuItem)
End While
Else
oMenuItem = New Syncfusion.JavaScript.Web.MenuItem
oMenuItem.Text = "*** No Skittles Links Found ***"
mnuLinks.Items.Add(oMenuItem)
End If
myReader.Close()
myReader = Nothing
myCommand.Dispose()
conn.Close()
conn.Dispose()
Many thanks for your help, John