There are multiple ways of posting data from view to controller using jquery + ajax in mvc 1. post data by assigning parameters one by one and bind it with model manually 2. post data by serializing form and automatically binding with model 3. post data by assigning parameters one by one + making custom class and assigning data to its variables which are named similarly as that of model Method 1: $.ajax({ url: "/Controller/SubmitAction", type: "POST", dataType: "text", data: { name: _name, age: _age, id: _id }, success: function (response) { alert("Success"); }, error: function () { alert("Error"); } }); public JsonResult Sub...
var result = from p in _context.ParentTable join c1 in _context.ChildTable1 on p.ID equals c1.ID into pc1Table from pc1Join in pc1Table.DefaultIfEmpty() join c2 in _context.ChildTable2 on p.ID equals c2.ID into pc2Table from pc2Join in pc2Table.DefaultIfEmpty() where (c1.columnname == "value1" || c2.columnname == "value2") && p.columnname == "value" select new { pID = p.ID, c1ID = c1.ID, c2ID = c2.ID};
Comments
Post a Comment