здесь список типов CRUD IEnumerable WorkingPlace.Models.PerchesDetail
когда список находится на экране и я нажимаю на кнопку, мне нужно значение всех полей,
но много попыток я не могу получить * 1003
HTML
@foreach (var item in Model)
{
<tr style="background-color:#eff6de">
<td class="hfr">
@Html.HiddenFor(modelItem => item.PerTranChallanId, new { @class = "PerTranChallanId" })
@Html.HiddenFor(modelItem => item.PTranCode, new { @class = "PTranCode" })
</td>
<td>
@Html.DisplayFor(modelItem => item.SypplyerName ,new {@class="sn", @id = "SypplyerName" })
</td>
<td>
@Html.DisplayFor(modelItem => item.ChallaNo)
</td>
<td>
@Html.DisplayFor(modelItem => item.ChallaDate)
</td>
<td>
@Html.DisplayFor(modelItem => item.TaxAmount)
</td>
<td>
@Html.DisplayFor(modelItem => item.TotalAmount)
</td>
<td>
@Html.ActionLink("Details", "Showchl1", new { id = item.PerTranChallanId , PTranCode=item.PTranCode }) |
</td>
<td class="con">
<input type="submit" id="convt" name="convt" value="Add To INv No:- @ViewBag.NewINVNo1" class="convt btn btn-success " />
</td>
<td class="csl">
<input type="submit" id="cansel" name="cancel" value="Cancel From INv No:- @ViewBag.NewINVNo1" class="convt btn btn-danger " />
</td>
</tr>
}
</table>
</div>
здесь мне нужен весь товар. значение элемента с помощью jquery
$(document).on('click', '.convt', function () {
alert("OK");
var spn = $(this).prop("#SypplyerName").text();
//var spn =$(this).prop("#SypplyerName").val();
var aaa = $(this).closest("tr").html("#SypplyerName").val();
spn1 = $(this).prop(".sn").val();
//spn1=$(this).prop(".sn").text();
aaa1 = $(this).closest("tr").html(".sn")val();
//aaa1 = $(this).closest("tr").html(".sn").text();
var nnn = $(".sn").text();
alert(spn);
alert(aaa);
alert(spn1);
alert(aaa1);
alert(nnn);
});
это попытка другого типа, но я могу изменить это значение
нужна помощь