2023~/c#(.net framework)
@ActionLink
yanii
2023. 4. 26. 11:27
@Html.ActionLink("Edit", "Edit", new { id=item.SEQ })
ActionLink 메서드의
첫 번째 인자는 보여질 문자열, 렌더되는 링크 텍스트
두 번째 인자는 실행하려는 액션 메서드의 이름(액션명)
세 번째 인자는 익명 객체로서 라우트 데이터를 생성
------
+
ActionLink("보여질 문자열", "액션명", "컨트롤러명", 넣어줄 값, html속성)
@Html.ActionLink("상세보기", "Details", null, new { id = item.boardNo }, new { @class = "btn btn-info", @style = "margin-left:10px;" })