tags:

views:

25

answers:

0
function submit(frm) {

       var tdata = $(frm).serialize();
       $.ajax({
           url: "/Organization/CreateOrganization",
           data: tdata,
           success: function (result) {
               alert("ssss");

           },
           type: "POST",
           datatype: "json"
       });

        return false;

how to make this call via ajax.beginform(i want to post the entire form inside it and bring back the ajax result display the errors if any otherwise redirect it to other form.Basically what i want to do is to transform the above submit function into making ajax call, definitely frm will not be passed.

<div id="errormsg"></div>

   <% using (Ajax.BeginForm(new AjaxOptions {OnSuccess="createSuccess"})) {%>