wallaceoc80
Programmer
I have a drop down list which is populated from a query to the database in the Page_Load method.
I also have a textfield and I want the value of this to be set to the selected value of the drop down list whenever the user selects a new value.
I have the code:
However, when I select something it always seems to put the value of the first element of the drop down list into the textfield instead of the value selected.
Can anybody help me out here?
Thanks,
Wallace
I also have a textfield and I want the value of this to be set to the selected value of the drop down list whenever the user selects a new value.
I have the code:
Code:
tf.setText(ddl.selectedItem.value.ToString());
However, when I select something it always seems to put the value of the first element of the drop down list into the textfield instead of the value selected.
Can anybody help me out here?
Thanks,
Wallace