Rahul Lakshakar

Rahul Lakshakar

  • 1.8k
  • 187
  • 16.5k

Pass Model data from view to controller using ajax

Nov 15 2018 11:07 PM
Hello Sir,
I am trying to pass model data from view  to controller but it's not working. Infact it's not firing the action in controller.
Please help and guide me.
My Code like this:
public class model{
report objReport = new report();
model = new model()
   objReport = new report();
public class reoprt{
public int reportID {get;set;}
public string save(model objModel)
return "done";
var objDailyReport = $("#CNform").serialize();

type: "POST",
url: "/dailyreportingregister/Save",
data: objDailyReport,
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function (r) {

Brought to you by: JavaScript SDK for Bold BI dashboard and analytics embedding. Free trial.

Answers (3)