Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
61 lines (49 sloc) 2.05 KB
@model HtmlPropertyHelperDemo.Models.RegisterViewModel
@{
ViewBag.Title = "Register";
}
<h2>@ViewBag.Title.</h2>
<form action="@Url.Action("Register","Account")" method="post" class="form-horizontal" role="form">
@Html.AntiForgeryToken()
<h4>Create a new account.</h4>
<hr />
@Html.ValidationSummary("", new { @class = "text-danger" })
<div class="form-group">
@using (var property = Html.BeginProperty(x => x.Email))
{
<label for="@property.ID" class="col-md-2 control-label" @property.ValidationAttributes>Email</label>
<div class="col-md-10">
<input type="email" class="form-control" id="@property.ID" name="@property.Name" value="@property.Value" @property.ValidationAttributes>
@property.ValidationMessage
</div>
}
</div>
<div class="form-group">
@using (var property = Html.BeginProperty(x => x.Password))
{
<label for="@property.ID" class="col-md-2 control-label" @property.ValidationAttributes>Password</label>
<div class="col-md-10">
<input type="password" class="form-control" id="@property.ID" name="@property.Name" value="@property.Value" @property.ValidationAttributes>
@property.ValidationMessage
</div>
}
</div>
<div class="form-group">
@using (var property = Html.BeginProperty(x => x.ConfirmPassword))
{
<label for="@property.ID" class="col-md-2 control-label">Confirm password</label>
<div class="col-md-10">
<input type="password" class="form-control" id="@property.ID" name="@property.Name" value="@property.Value" @property.ValidationAttributes>
@property.ValidationMessage
</div>
}
</div>
<div class="form-group">
<div class="col-md-offset-2 col-md-10">
<input type="submit" class="btn btn-default" value="Register" />
</div>
</div>
</form>
@section Scripts {
@Scripts.Render("~/bundles/jqueryval")
}