I am trying to submit when a dropdownlist changes by doing this
@using (Html.BeginForm("testAction", "FishingTrip"))
{
@Html.DropDownListFor(x => x.Day, Model.Days, new { onchange="this.form.submit();" })
}
This works fine but I am having problems (in other words don’t know how) to get the option value on the server, can anybody help me with this ?
cheers
sushiBite
You could simply have your POST controller action take it as parameter and leave the default model binder to the binding:
Or directly use the view model you used in the view: