Reputation: 727
How can I pass values back from a text box or dropdownlist or any control from a razor view back to an mvc3 controller? These values are not strongly bound so I don't have a model to bind these values to?
Upvotes: 0
Views: 725
Reputation: 2202
This will work:
public ActionResult SubmitAction(FormCollection collection) {
string formValue = collection["formValue"];
}
Edit:
public ActionResult SubmitAction(ModelName model, string field1, int field2) {
}
Upvotes: 2