Controller:
[HttpPost]
public ActionResult Edit(FormCollection form)
{
string name = form["firstname"];
}
View:
@Html.TextBox("firstname", null, new { style = "width:100px" })
I am entering some text into the textbox and submitting the form but when I break the program at the string declaration, the name variable is empty, even though when I hover over form["firstname"], the value I entered in the textbox appears in Visual Studio.
How can take the text entered in the textbox and place it into a string variable?