Asp net dropdownlist selected value not updating

Instead we want to display a more friendly description such as “It is complicated”.

Net Grid View control populated from the Customers table of Northwind database.

There actually is a way to keep the model binding and have the correct select list and selected value.

The trick is you must add the selected list to the View Data with the key name of you property and pass null to the Html.

The Text Box controls provide basic data entry support for editing a record.

This approach will be very similar to second one, here we will use Enum instead of Subject model class.

You can use the Smart tags menu or switch to the ASP.

Recently one of the readers reported a problem that the Drop Down List helper is not working as expected.

Notice that the name for the drop down list is “Registration. The reason for doing this is so when form is posted back, it will bind to the car instances property.

This part is handy, but what you don’t expected is that when the edit view is displayed the value that is stored in our car’s registration country is not selected in the drop down.

Leave a Reply