I have the following DropDownListFor
generated by razor:
@Html.DropDownListFor(m => m.SelectedSize, Model.AvailableSizes, "Select Size", new { @class = "form-control input-sm", @id ="availablesize" })
I want to pass the selected value of DropDownList
to a controller ViewResult
method:
public ViewResult Index(Cart cart, string returnUrl)
{
return View(new CartIndexViewModel
{
ReturnUrl = returnUrl,
Cart = cart,
});
}
Help please!