By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,299 Members | 1,228 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,299 IT Pros & Developers. It's quick & easy.

changing textBox text with change of DropDownList

P: n/a
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?
Nov 21 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Disregard. I corrected this myself.

"rr****@800mcmahan.com" wrote:
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?

Nov 21 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.