Listing 4: VB.NET Code Behind Form1 Dim das1 As DataSet Private Sub btnStartswithlookup_Click( _ ByVal sender As System.Object, _ ByVal e As System.EventArgs) _ Handles btnStartswithlookup.Click 'Declaration of proxy variable and 'variable to hold array of objects Dim xws1 As New cab233a.SSMWSEmpPhones Dim response As System.Array 'Populate response object with LikeLname 'method and exit if an error occurs. Try response = xws1.LikeLname(TextBox1.Text) Catch ex1 As Exception MsgBox("Error message:" & _ vbCr & _ ex1.Message) Exit Sub End Try 'Assign System Array response variable 'to das1 dataset. das1 = response(0) 'Bind DataGrid1 to table in das1. Dim strMember As String = _ das1.Tables(0).TableName DataGrid1.SetDataBinding(das1, strMember) End Sub Private Sub btnEditselectedrow_Click( _ ByVal sender As System.Object, _ ByVal e As System.EventArgs) _ Handles btnEditselectedrow.Click Dim int1 As Integer 'Open a new instance of Form2. Dim frm2 As New Form2 frm2.Show() 'Copy selected row values from 'DataGrid1 in Form1 to text boxes in 'Form2. int1 = DataGrid1.CurrentRowIndex With das1.Tables(0) frm2.txtFname.Text = .Rows(int1)("Fname") frm2.txtLname.Text = .Rows(int1)("Lname") frm2.txtPhone.Text = .Rows(int1)("Phone") End With End Sub