在Folder中插入图像在Controller中显示null值

我想在客户端插入图像。 图像URL插入到网格中,但是当我单击“保存”按钮时,图像URL不会传递给控制器​​并显示结果为空值。 但图像URL显示在网格图像列中,但未传递给控制器​​。

第二个问题:当我上传图像然后只显示我要显示图像视图的图像的Url时,您可以告诉我如何在此代码中显示图像。

C#

[HttpPost] public ActionResult mQuotationInsert(int Qt_ID, string EnteryDate, string Purpose, Quotation[] Quot, string AddNew) { string result = "Error! Order Is Not Complete!"; try { objQuotation.QuotationInsert(Qt_ID, EnteryDate, Purpose, Quot, AddNew); ModelState.Clear(); result = "Quotation Inserted Successfully!"; return Json(result, JsonRequestBehavior.AllowGet); } catch (Exception) { throw; } } 

使用Javascript

 // Add Multiple Record $("#addToList").click(function (e) { e.preventDefault(); if ($.trim($("#PartyName").val()) == "" || $.trim($("#txtfile").val()) == "") return; var Srno = document.getElementById("detailsTable").rows.length, PartyName = $("#PartyName").val(), image = $("#txtfile").val(), IsMature = $("#chkNIsMature").is(":checked"), detailsTableBody = $("#detailsTable tbody"); var Qt = '' + Srno + '' + PartyName + '' + image + '' + IsMature+ ' Remove'; detailsTableBody.append(Qt); clearItem(); }); $("#saveQuotation").click(function (e) { e.preventDefault(); var QuotationArr = []; QuotationArr.length = 0; $.each($("#detailsTable tbody tr"), function () { QuotationArr.push({ Srno: $(this).find('td:eq(0)').html(), PartyName: $(this).find('td:eq(1)').html(), image: $(this).find('td:eq(2)').html(), IsMature: $(this).find('td:eq(3)').html() }); }); var data = JSON.stringify({ Qt_ID: parseInt($("#txtQtID").val()), EnteryDate: $("#txtNEnteryDate").val(), Purpose: $("#txtNPurpose").val(), Quot: QuotationArr, AddNew: $("#AddNew").val() }); $.when(saveQuotation(data)).then(function (response) { console.log(response); }).fail(function (err) { console.log(err); }); }); 

HTML

   
Quotation Details

@Html.CheckBoxFor(m => m.IsMature, new { @class = "custom-control-input", @id = "chkNIsMature" })
SrNo. Party Name Image Mature