Below is my code
- var model = {
- Name: name,
- Gender: gender,
- Subjects: subs // array of Subject object (Id,Name)
- };
- $.ajax({
- type: "post",
- url:"/home/Save",
- dataType: "json",
- contentType: "application/json;charset=utf-8",
- data:{Model:model},
- cache: false,
- success:function(){}
- })

Sachin SinghRank #66 · 26.2K reputationPosted Oct 16, 2020, 8:38 PM EDT