Is there any gain in performance when using jQuery to perform ajax requests in relation to the post using Html.BeginForm?
@using (Html.BeginForm("Create", "Teste")
{
@Html.AntiForgeryToken()
@Html.ValidationSummary(true, "", new { @class = "text-danger" })
<div class="form-group">
@Html.LabelFor(m => m.Nome, new { @class = "col-md-2 control-label" })
<div class="col-md-10">
@Html.TextBoxFor(m => m.Nome, new { @class = "form-control" })
<span class="help-block">@Html.ValidationMessageFor(model => model.Nome, "", new { @class = "text-danger" })</span>
}
<div class="form-group">
<div class="col-md-offset-2 col-md-10">
<input type="submit" class="btn btn-default" value="Enviar" />
</div>
</div>
If it is better to do via ajax request, do you have any sample code where you deal with ValidationSummary and ValidationMessageFor?