1
부분보기에 목록 페이지가 있습니다. 각 목록에 대해 jQuery 대화 상자를 열어 편집/삭제 링크를 통해 데이터를 편집/삭제합니다. 그러나 대화 상자는 첫 번째 항목에서만 열리고 나머지 목록에서는 작동하지 않습니다.asp.net mvc 4 삭제 대화 상자가 첫 번째 항목에만 열림
내가하고있는 것에 무엇이 누락 되었습니까?
부분보기 목록
>foreach (var item in Model) {
> <tr>
> <td>
> @Html.DisplayFor(modelItem => item.ReportName)
> </td>
> <td>
> @Html.DisplayFor(modelItem => item.Note)
> </td>
> <td class="icon"><a id="editReportLink" href="#" title="Edit note"><img src="~/Content/_images/icon_edit.png" /></a></td>
> <td class="icon"><a id="deleteReportLink" href="#" title="Delete thread"><img src="~/Content/_images/icon_delete.png" /></a></td>
> </tr>
>}
jQuery를 기능
$("#delete-button").dialog({
autoOpen: false,
height: "auto",
width: "auto",
modal: true,
resizable: false,
});
$("#deleteReportLink").click(function() {
alert("test");
$("#delete-button").dialog("open");
});