Created
January 21, 2016 04:00
-
-
Save jesulink2514/99c43887925211ee3276 to your computer and use it in GitHub Desktop.
Vista de nuevo producto con bootstrap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@model RefactorView.Models.Product | |
@{ | |
ViewBag.Title = "Nuevo"; | |
} | |
<h2>Nuevo</h2> | |
@using (Html.BeginForm()) | |
{ | |
@Html.AntiForgeryToken() | |
<div class="form-horizontal"> | |
<h4>Product</h4> | |
<hr /> | |
@Html.ValidationSummary(true, "", new { @class = "text-danger" }) | |
<div class="form-group"> | |
@Html.LabelFor(model => model.Nombre, htmlAttributes: new { @class = "control-label col-md-2" }) | |
<div class="col-md-10"> | |
@Html.EditorFor(model => model.Nombre, new { htmlAttributes = new { @class = "form-control" } }) | |
@Html.ValidationMessageFor(model => model.Nombre, "", new { @class = "text-danger" }) | |
</div> | |
</div> | |
<div class="form-group"> | |
@Html.LabelFor(model => model.Descripcion, htmlAttributes: new { @class = "control-label col-md-2" }) | |
<div class="col-md-10"> | |
@Html.EditorFor(model => model.Descripcion, new { htmlAttributes = new { @class = "form-control" } }) | |
@Html.ValidationMessageFor(model => model.Descripcion, "", new { @class = "text-danger" }) | |
</div> | |
</div> | |
<div class="form-group"> | |
@Html.LabelFor(model => model.Precio, htmlAttributes: new { @class = "control-label col-md-2" }) | |
<div class="col-md-10"> | |
@Html.EditorFor(model => model.Precio, new { htmlAttributes = new { @class = "form-control" } }) | |
@Html.ValidationMessageFor(model => model.Precio, "", new { @class = "text-danger" }) | |
</div> | |
</div> | |
<div class="form-group"> | |
@Html.LabelFor(model => model.Categoria, htmlAttributes: new { @class = "control-label col-md-2" }) | |
<div class="col-md-10"> | |
@Html.EditorFor(model => model.Categoria, new { htmlAttributes = new { @class = "form-control" } }) | |
@Html.ValidationMessageFor(model => model.Categoria, "", new { @class = "text-danger" }) | |
</div> | |
</div> | |
<div class="form-group"> | |
<div class="col-md-offset-2 col-md-10"> | |
<input type="submit" value="Create" class="btn btn-default" /> | |
</div> | |
</div> | |
</div> | |
} | |
<div> | |
@Html.ActionLink("Back to List", "Index") | |
</div> | |
@section Scripts { | |
@Scripts.Render("~/bundles/jqueryval") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment