asp.net mvc - How to passing Controller a FormCollection and a class type object to action -
I have encountered a problem with the Controller Pass form store and a Class Type object to take action through Ajax calls .
Below is my code. Public addressers AddDealNotes (deal note objDealNote, FormCollection fc) {// code}
 To send a javascript ajax request using the jquery $ .post object, you need to make sure that you type the data & amp; post-text "itemprop =" text "> 
contentType parameter.
  & lt; Script & gt; Function sendDealNotes (note, form) {var dataOutput = {"note": note, "form": form.serializeArray ()}; Var sendData = JSON.stringify (Data Optical); Type: "Jason", Content Type: "Application / Jason", Data: sendData}) .Done (function () {Alert ("success");). File (error) {warning ("error" + error);}) .ways (function () {alert ("full");}); } & Lt; / Script & gt;    
 
  
Comments
Post a Comment