체크 박스 값과 텍스트 상자 값을 model.Here로 바인딩해야합니다. 모델을 사용하여 데이터를 검색하고 게시합니다. 몇 가지 옵션을 시도했지만 작동하지 않았습니다. 내가 컨트롤러에 체크 박스와 텍스트 상자에 값을 전송해야viewmodel에 확인란과 텍스트 상자를 바인딩하십시오.
@model IEnumerable<ALDS.Web.Areas.AR.Models.ReportViewModel>
@{
ViewBag.Title = "Standings";
}
<table class="table table-bordered">
<thead>
<tr>
<th>LR Date</th>
<th>LR Line No</th>
<th>Issue</th>
<th>Correction Response</th>
<th>Remarks</th>
<th>Submission</th>
</tr>
</thead>
<tbody>
@foreach (var item in Model)
{
<tr>
<td>
@item.InsertDate
</td>
<td>
@item.LRLineID <a href="">View</a>
</td>
<td>Margin % incorrect</td>
<td><label for="cbox1">Corrected</label> <input type="checkbox" name="Corrected" value="@item.Status" /> <label for="cbox1">Neglected</label> <input type="checkbox" name="Neglected" value="@item.Status"/></td>
<td><input type="text" value="@item.Comments"/></td>
<td><a href="@Url.Action("Update","Error",Model)">Submit</a></td>
</tr>
}
</tbody>
</table>
:
다음은 내 코드입니다. 도와주세요.
그의 모델 ID를'.hidden()'안에 넣으라는 OP를 잊지 말고 –
작업을하지 못했습니다. : | – user3206357
양식 태그 "양식 사용 중 ..."을 입력하지 않았습니까? – TTCG