hi
could you please tell me the command to insert values from the dropdown list into sql using c# coding

Recommended Answers

All 2 Replies

The currently selected value, or all values available in the dropdown? You would also need to post your database schema. You can't just write a query to stick data in to SQL Server without knowing where the data is going. Post the code you're using and indicate where you are having problems.

cmd.Parameters.AddWithValue("@ProductName", DropDownListDDL.Text);

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.