0

I am new with ASP.Net and C#. I have problem with drop down list. How to declare drop down list and how to save user selection from drop down list into SQL database using C# ?

2
Contributors
1
Reply
4
Views
7 Years
Discussion Span
Last Post by jbisono
0

To get the selected item from a dropdownlist you do this.

String selectedItem = DropDownList1.SelectedItem.Value;

now if you want to save that value right after the user change selection you have to set autopostback property in the dropdownlist to true and under the OnselectedIndexChanged event create your procedure to save that value in the database.

regards

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.