I have created a sql database table country with country name and country code. I have selected only country name in the drop down list. Now I want to insert the country code in the database using button.

Recommended Answers

All 2 Replies

What you may consider doing is binding the country name to the text and country Id to the value properties of the drop down. Then when you press the button, in the button's click event, get the dropdown.selectedItem.value and save it to your DB table.

what insert do you want?
can you tell us for details?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.