I have a question, that how can I pass data from MVC View to Controller?
My View:
@Html.Label("Payment Method")
@Html.DropDownList("PaymentMethod")
@Html.ValidationMessageFor(model => model.PaymentMethod)
(Definition of ViewData["PaymentMethod"]
var paymentMethod = from p in db.PaymentMethods select p;
ViewData["PaymentMethod"] = new SelectList(paymentMethod,"ID","Name")
)
I wanna get the value of Dropdownlist["PaymentMethod"]. But how? Thanks for helps!