Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VB.net - update text field from dropdown selection?

Status
Not open for further replies.

slybitz

Technical User
Mar 25, 2005
113
US
So I have a dropdown box that I have filled with two values: AFD, CFD. All I'm trying to do is to get a text box (txtComp) to change its value to that of a dropdown list box (cmbCompany) selection. For some reason I cannot get the text box to reflect this data. I can't even get the text box to just say "CFD" like below with an index change in the dropdown box (which is initially set to "AFD" onload). When I run the debugger and change the dropdown box's values it never recognizes that the "cmbCompany_SelectedIndexChanged" sub (below) is never even initiated. Am I missing something? What all do I need to do to make the txtComp value change to that of the dropdown box on an index change? Thanks for your help!


Code:
Public Sub cmbCompany_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmbCompany.SelectedIndexChanged
Me.txtComp.Text = "CFD"
End Sub
 
The ASP.NET forum is forum855

________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first.
'If we're supposed to work in Hex, why have we only got A fingers?'
Drive a Steam Roller
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top