function SaveCall() { $("#ItemData").val(JSON.stringify($("#jqxOpStockGrid").jqxGrid('getboundrows'))); $.ajax({ url: '/INVOpeningStock/create', type: 'POST', data: $("#INVOpeningStock_Form").serializeArray(), cache: false, aync: false, success: function (data) { if (!data.success) { } else { } } }); }
[HttpPost] public ActionResult Create(INVOpeningStock invopeningstock ) { //Method Body }
@using (Html.BeginForm(new { id = "INVOpeningStock_Form" })) { @Html.AntiForgeryToken() @Html.ValidationSummary(true) <fieldset class="fieldset"> <table width="100%" align="center" class="textleft"> <tr> <td width="20%"> <div class="editor-label"> @Html.LabelFor(model => model.cName) </div> </td> <td width="80%" align="left"> <div class="editor-field"> @Html.TextBoxFor(model => model.cName, new { maxlength = 50, @class = "textbox mediumtxt reqtext" }) </div> @Html.ValidationMessageFor(model => model.cName, "", new { @class = "required" }) </td> </tr> </table> </fieldset>
$("form").serializeArray()
$("#INVOpeningStock_Form").serializeArray()
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)