@model HelloWorldMvcApp.Objeto
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<script type="text/javascript" src="https://code.jquery.com/jquery-1.11.3.js" ></script>
<script type="text/javascript" src="https://rawgit.com/aspnet/jquery-ajax-unobtrusive/master/jquery.unobtrusive-ajax.js" ></script>
@using (Ajax.BeginForm("Dados", "Home", new AjaxOptions {
}, new { @id = "meuForm" }))
@Html.LabelFor(model => model.Nome)
@Html.TextBoxFor(model => model.Nome)
@Html.LabelFor(model => model.Valor)
@Html.TextBoxFor(model => model.Valor)
@Html.LabelFor(model => model.Percentual)
@Html.TextBoxFor(model => model.Percentual)
<input type="submit" value="Enviar" />
var onSucess = function (response) {
"Rcebi com sucesso os seguintes dados: \n" +
"Nome: " + (response.Nome || "Não Informado") + "\n" +
"Valor: " + response.Valor + "\n" +
"Percentual: " + response.Percentual