When I submit the data, even though I type in 3/15/2012, the model is always populated with 1/1/0001. What am I missing?
<p>
@Html.LabelFor(m => m.EventDate, "Date of Event")<br />
@Html.TextBoxFor(m => m.EventDate)
</p>
<p>
@using (Html.BeginForm("Create", "Event", FormMethod.Post))
{
<input id="create" type="submit" value="Submit New Event" />
}
</p>
You need to put the textbox inside the form.
Otherwise, it never gets sent to the server.