@using (Html.BeginForm("Add", "EmailTemplate", FormMethod.Post, new { id = "submitForm", enctype = "multipart/form-data",onsubmit = "javascript:return fnDuplicatecheck()"})) { <input type="submit" value="Save" class="float-r btn-gray1" /> } javascript function fnDuplicatecheck() { loader(); debugger; var TemplateName = document.getElementById('TemplateName').value; $.ajax({ url: '@Url.Action("GetDuplicateTemplate", "EmailTemplate")', type: "GET", data: { TemplateName: TemplateName }, success: function (data) { debugger; if (data == "Yes") { $("#popup_ok").click(); jAlert("Template Name Already Exist", "Error"); return false; } else { $("#popup_ok").click(); return false; } } }); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)