我有DropDownListFor
剃须刀生成的以下内容:
@Html.DropDownListFor(m => m.SelectedSize, Model.AvailableSizes, "Select Size", new { @class = "form-control input-sm", @id ="availablesize" })
我想将选定的值传递DropDownList
给控制器ViewResult
方法:
public ViewResult Index(Cart cart, string returnUrl)
{
return View(new CartIndexViewModel
{
ReturnUrl = returnUrl,
Cart = cart,
});
}
请帮忙!