MVC5 / Razor TextAreaFor null value
I have a very simple one @Html.TextAreaFor()
in the form and for some reason the textarea value never gets to my controller.
VIEW
<p class="SmallText">(Multiple Entries Allowed)</p>
@Html.TextAreaFor(x => x.quickSearch, new { cols = 30, @rows = 5 })
VIEW-MODEL
public String quickSearch;
CONTROLLER
public ActionResult FindRecord(FindRecordViewModel Model)
{
var ImNotCrazy = Model.quickSearch;
}
The problem is that when I debug Model.quickSearch
it is always null and never really matters.
+3
source to share