function SendMessage(t) { //var fdata = $(t).parents("form").serialize(); if ($("#info").valid()) { var fdata = new FormData($("#info")[0]); $.ajax({ type: "POST", url: "/Form/SendMessage", success: function (cevap) { if (cevap.indexOf("success") > 0) { setTimeout(function () { alert(cevap); }, 1000); } else { alert(cevap) } } }) } }