@model HelloWorldMvcApp.SampleViewModel
<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="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>@Html.ActionLink("Inicio", "Index", "Home")</li>
<li>@Html.ActionLink("Acerca de", "About", "Home")</li>
<li>@Html.ActionLink("Contacto", "Contact", "Home")</li>
<li>@Html.ActionLink("Producto", "Nuevo", "Nuevo")</li>
<li>@Html.ActionLink("cristopher urbina", "NuevaVista", "Home")</li>
<li>@Html.ActionLink("Producto","Producto","Nuevo")</li>
<div class="col-md-6 col-md-offset-3">
<h2 style="text-align:center">Alta de Producto</h2>
@using (Html.BeginForm())
<label for="txtcodigo de producto" class="form-label">codigo de producto</label>
<input type="text" name="codigo del producto" value="" id="txtcodigo del producto" class="form-control" />
<label for="txtnombre" class="form-label">nombre del producto</label>
<input type="text" name="nombre del producto" value="" id="txtnombre" class="form-control" />
<label for="txtdescripcion" class="form-label">descripcion</label>
<input type="text" name="descripcion" value="" id="txtdescripcion" class="form-control" />
<label for="txtprecio" class="form-label">precio</label>
<input type="text" name="precio" value="" id="txtprecio" class="form-control" />
<label for="txtfecha" class="form-label">fecha</label>
<input type="datetime" name="fecha" value="" id="txtfecha" class="form-control" />
<input type="submit" name="name" value="enviar datos" class="btn btn-primary" /> <input type="submit" name="name" value="limpiar" class="btn btn-danger" />
<div class="alert alert-warning fade">
<img src="http://entechprod.blob.core.windows.net/dotnetfiddle/morpheus.jpg" style="max-width:100%;"/><br/><br/>
<strong><span class="alert-content"></span></strong>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<script src="//netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script>
<script src="//ajax.aspnetcdn.com/ajax/jquery.validate/1.11.1/jquery.validate.min.js"></script>
<script src="//ajax.aspnetcdn.com/ajax/mvc/4.0/jquery.validate.unobtrusive.min.js"></script>
<script type="text/javascript">
function openAlert(txt) {
$('.alert-content').text(txt);
$('.alert').addClass('in');
$('.alert').removeClass('in');
var answer = '@Model.Answer';
if(answer && answer != '')
$('#Question').change(closeAlert);
$('#Question').keyup(closeAlert);
$('.submit').click(function(){
url: '@Url.RouteUrl(new{ action="GetAnswer", controller="Home"})',
data: {Answer: '', Question: $('#Question').val()},
contentType: "application/json; charset=utf-8",
success: function(resp) {