Help

plumage

Active member
Joined
Jul 12, 2004
Messages
38
Programming Experience
Beginner
if i have a txtbox which allow me to choose video, vcd, and dvd.then when i choose (example)video, and submit into the database,instead of inserting the word,video,iszit possible that when insert, the word is '1' NOT VIDEO.

THANKS.
 
I beleive the control you want is a comboBox. The comboBox can provide a dropdown list of items. You can create a dataList (anything that supports iList or iListSource; for example a dataTable, collection, ...) that has two columns; set the dataSource of the comboBox to the dataList then set the DisplayMember to the column that contains the text you want displayed (Video, VCD, DVD, ...) and the ValueMember to the column that contains the numeric values (1, 2, 3, ...). Then instead of using the Text property of the comboBox, use the SelectedValue property to update the dataBase with.
 
Back
Top