0

i want to grab "DataValueField" of dropdownBox and want to use it in INSERT statement , so how ?

i have already filled my Dropdownbox in grid view now want to get DataValueField and using it in insert statement , how ?

3
Contributors
2
Replies
4
Views
4 Years
Discussion Span
Last Post by JorgeM
1

It is simple:

value1 = mydropdown.DataValueField;

and use it in the query:

sqlQuery = "INSERT INTO table_name (column1, column2, column3)
VALUES (" & value1 & ", value2, value3)";

Edited by spectra: code use

1

Are you sure you are not asking for the "Selected Value" that is chosen by the user in the dropdown control?

If so, it would be dropdown1.selectedValue

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.