hi,
i have an error on dropdownlist
when i run the page of edit_profile_page
then that time it loads successfully and then that time data also completly filled successfully..
but when i changed the dropdownlist value and click on updatebutton it shows error.
'cmbprofilefor' has a SelectedValue which is invalid because it does not exist in the list of items.
Parameter name: value
"cmbprofilefor" is my dropdownlist name
i used this line of code for selected item which is stored in database
cmbprofilefor.SelectedValue = dt.Rows[0]["ProfileFor"].ToString().Trim();
this code is successfully work and display value selected in dropdownlist which stored in database.
but when i change the items means when i selected item changed from dropdownlist) and click on save button that time it shows me error.
where is the my mistake ??