Which parts should I change to make my form Ajax Based or JQuery Based. (Based on your recommendation between Ajax or JQuery) How the code will look after the changes?
Here's the code
@using (Html.BeginForm("Contact", "Home", FormMethod.Post, new { name = "send-contact",
id = "contactform1", @class="validateform" }))
{
@Html.AntiForgeryToken()
if (!String.IsNullOrEmpty(@ViewBag.SendResultMessage))
{
<text>
@section CustomScripts
{
<script type="text/javascript">
$("#myModal").Show({ ...});
</script>
}
</text>
}
@Html.TextBoxFor(m => m.Name)
<div class="validation">@Html.ValidationMessageFor(m => m.Name)</div>
<button class="b.." id="btnSubmit" type="submit">Submit message</button>
}
</div>
As a note also here I want to show a "Modal Dialog" , If using Ajax what should be set as UpdateTargetId
?
any help is really appreciated.