Hello, i dnt knw how to get the selected value and then save it in database.
I have a country entity: countryId, country_Name
and i also have a profile entity with this property:
public selectlist countrylist {get; set;}
then in the create action of the controller, i used linq to get the list of countries from database
and in my view i implemented the dropdownlist like this:
@html.dropdownlist("ddlcountry", model.countrylist) but if i submit it, i get null value error for contrylist.
Please, how can i save it in database. In profile table, i now see countrylist_datavalue & countrylist_datatext