changing textBox text with change of DropDownList

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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top