Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Private Sub btnGet_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnGet.Click
Dim item As ListItem
Dim DS As DataSet
Dim MyConnection As SqlConnection
Dim MyCommand As SqlDataAdapter
Dim sFields As String = ""
For Each item In ListBox2.Items
sFields = ListBox2.SelectedItem.Value & ", "
Next
If sFields.Length > 2 Then
sFields = sFields.Substring(0, (sFields.Length - 2))
End If
Dim MySQL As String = "Select " & sFields & " from vwContactsAll where tag = 'Memst' and type='m' and active = '1'"
MyConnection = New SqlConnection(ConfigurationSettings.AppSettings("connectionString"))
MyCommand = New SqlDataAdapter(MySQL, MyConnection)
DS = New DataSet
MyCommand.Fill(DS, "stuff")
DataGrid1.DataSource = DS.Tables("stuff").DefaultView
DataGrid1.DataBind()
End Sub