Dropdownlist selected value is not saved in the databaseIn run mode as follows
Designation Courseofficer (Dropdownlist)
in the designation column three values are there in the dropdownlist
When user type the name ram in textbox1 and select the designation from the dropdownlist.
Suppose i am selecting the Courseofficer from the dropdownlist and click Save button records are saved.
but i am selecting the courseofficer from the dropdownlist only. But in database
last value Director is saved in the database.
Save button code as follows
Sql = "insert into Designations values('" + txt_name.Text + "','" + ddldesg.SelectedValue.ToString() + "')";
LblErr.Text = "Record Inserted Successfully";
In database records as follows
ID Name Designations
1 Ram Director
please help me what is the problem in my above code.