How do I use the selected value from @Html.DropDownListFor for OnPost input value?
- @Html.DropDownListFor(x => Model.HazardsListEdit.SelectedHazClassId,
- new SelectList(Model.HazardsListEdit.HazardsClasses, "Value", "Text"),
- htmlAttributes: new { @class = "form-control", id = "HazClass", @required = true })
- <input hidden asp-for="HazId.HazClass" value=" " />