Private Sub Mat_Sub_NoComboBox_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Mat_Sub_NoComboBox.SelectedIndexChanged TextBox1.Text = Mat_Sub_NoComboBox.SelectedValue con.ConnectionString = myconstring 'Fetch Project_id to textbox Dim Prjda As New SqlDataAdapter("SELECT trade FROM Mat_e1_prj where mat_sub_no='" + Mat_Sub_NoComboBox.SelectedValue + "'", con) Dim Prjdt As New DataTable Prjda.Fill(Prjdt) Project_IDTextBox.Text = Prjdt.Rows(0).Item("Trade")
If dt.rows.count > 0 then Project_IDTextBox.Text = Prjdt.Rows(0).Item("Trade") End If
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)