Hi anonymous user,
Ok, I was able to add @azzedinehtmlsql .ActionLink("Character Detail", "CharDetail", new { id = @character.Id }) to get it to work but it breaks the original button.
Is there something I can add to <a class="list-group-btn list-group-item-action d-flex gap-3 py-3" aria-current="true" asp-controller="FifthEd" asp-action="CharDetail"> to achieve the same result?
You can use the asp-route-{value}
attribute to add the parameter, like this (the controller name is "FifthEd" and action name is "CharDetail"):
<a class="list-group-btn list-group-item-action d-flex gap-3 py-3" aria-current="true" asp-controller="FifthEd" asp-action="CharDetail" asp-route-id="@character.Id">Character Detail</a>
it is same with the following Html helper:
@Html.ActionLink("Character Detail", "CharDetail", "FifthEd" , new { id = @character.Id })
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
Best regards,
Dillion