Skip to content

Instantly share code, notes, and snippets.

@jesulink2514
Created January 21, 2016 05:57
Show Gist options
  • Save jesulink2514/a6361c3f942df3b4f035 to your computer and use it in GitHub Desktop.
Save jesulink2514/a6361c3f942df3b4f035 to your computer and use it in GitHub Desktop.
Nuevo.cshtml refactorizado para usar el framework Bootstrap
@model RefactorView.Models.Product
@{
ViewBag.Title = "Nuevo";
var controlSize = new Size(10,10,6,12);
}
<h2>Nuevo</h2>
@using (Html.BeginForm())
{
@Html.AntiForgeryToken()
<div class="form-horizontal">
<h4>Product</h4>
<hr />
@Html.ValidationSummary(true, "", new { @class = "text-danger" })
@Html.BootstrapTextboxFor(x=>x.Nombre,controlSize)
@Html.BootstrapTextboxFor(x => x.Descripcion, controlSize)
@Html.BootstrapTextboxFor(x => x.Precio,controlSize)
@Html.BootstrapTextboxFor(x => x.Categoria, controlSize)
<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>
}
@section Scripts {
@Scripts.Render("~/bundles/jqueryval")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment