changing textBox text with change of DropDownList

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm using the following code to change the value of my text box but it's
failing:

Private Sub usersDropDownList_SelectedIndexChanged(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
usersDropDownList.SelectedIndexChanged

Dim Mv As New DataView(DsUsers1.Tables("users"))
Mv.RowFilter = "id=" & usersDropDownList.SelectedValue.ToString
emailAddressBox.Text = Mv.Item("EmailAddress").ToString

End Sub

Now DsUsers1 is the dataSet I'm using to populate my dropDownList
(usersDropDownList) so I know it's valid. It's pulling the data from the
"users" table and it's pulling down the fields "id, usersName and
emailAddress" but It's not changing the text on change. Any ideas?
 
Back
Top