@model HelloWorldMvcApp.StudentViewModel
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Bootstrap 101 Template</title>
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css">
.field-validation-error {
<div class="col-md-6 col-md-offset-3">
<h3>Submit button inside the form</h3>
@using (Html.BeginForm("Enroll", "Home", FormMethod.Post))
@Html.LabelFor(m => m.Name)
@Html.TextBoxFor(model => model.Name, new {@class="form-control"})
<input type = "submit" value="Enroll" class="btn btn-primary"/>
<h3>Submit button outside the form</h3>
@using (Html.BeginForm("Enroll", "Home", FormMethod.Post, new { id = "myFrom" }))
@Html.LabelFor(m => m.Name)
@Html.TextBoxFor(model => model.Name, new {@class="form-control"})
<input type="submit" value="Enroll (outside)" form="myFrom" class="btn btn-primary"/>
<h3>Multiple submit buttons, posting back to different action methods</h3>
@using (Html.BeginForm("Enroll", "Home", FormMethod.Post))
@Html.LabelFor(m => m.Name)
@Html.TextBoxFor(model => model.Name, new {@class="form-control"})
// your main submit button will post back to: /Home/Enroll (default behavior)
<input type = "submit" value="Enroll" class="btn btn-primary"/>
// your Delete button will post back to: /Home/Delete
<input type = "submit" value="Delete" formaction="@Url.Action("Delete")" formmethod="post" class="btn btn-danger"/>
<a href='https://www.shopless.co.nz'>Brought to you by Shopless</a>