Public Sub DropDownList1_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles DropDownList1.SelectedIndexChanged
Dim strConnect As String = Nothing
strConnect = Session("Data Source=192.168.1.88;Initial Catalog=ATBGISMAPDB;Persist Security Info=True;User ID=gis;Password=Pa5word@tb")
Dim a As String = "SqlDataSourceCustomer" 'datasourceID'
Dim b As String = "SqlDataSourceTank" 'datasourceID'
Dim c As String = "SqlDataSourceKiosk" 'datasourceID'
Dim d As String = "SqlDataSourcePipa" 'datasourceID'
If DropDownList1.SelectedItem.Value = a Then
Query = "SELECT * FROM DBCUSTOMER where a = '" & LabelDDL.Text & "'"
ElseIf DropDownList1.SelectedItem.Value = b Then
Query = "SELECT * FROM METER_MAIN where b = '" & LabelDDL.Text & "'"
ElseIf DropDownList1.SelectedItem.Value = c Then
Query = "SELECT * FROM KIOSK where c = '" & LabelDDL.Text & "'"
ElseIf DropDownList1.SelectedItem.Value = d Then
Query = "SELECT * FROM PIPELINE_NEW where d = '" & LabelDDL.Text & "'"
End If
End Sub
But, with above code the function not running yet. Can anyone help me?
'sorry for my english'