I am having problems inserting values (strings) into a database in ASP.NET MVC / C#. I am stuck because I don't know what to do.
@using (Html.BeginForm("Index", "Upload", FormMethod.Post))
{
@Html.Label("Name:")
@Html.TextBox("name", null, new { @class = "form-control"})
@Html.Label("Surname:")
@Html.TextBox("surname", null, new { @class = "form-control" })
@Html.Label("Email:")
@Html.TextBox("email", null, new { @class = "form-control" })
@Html.Label("Description:")
@Html.TextArea("description", null, new { @class = "form-control" })
<br/>
<input type="submit" class="btn btn-primary" value="Send" />
}
My model is empty ... :-(
namespace GikStore.Models {
public class ContactModels
{
}
}
Do I have to do anything with the controller?