Topic: .stretched-link causes error with asp.net asp-route-...

vonmonckl free asked 4 years ago


It would be great if .stretched-link would work within a table, as to link full rows.

<table>
 @foreach (var item in Model)
 {
    <tr>
        <td>
             <a asp-action="Details" asp-route-id="@Model.Id" class="stretched-link"> Go to         details</a>
         <td>
         <td>
              Other cell
          </td>
            <td>
               And another cell
           </td>
     </tr>
 }
 </table>

Actual behavior The link does stretch across the row (good news!), but... the asp-route-id variable sticks to the number 1. Am I making a mistake, or is it a bug/missing feature?


Grzegorz Bujański staff commented 4 years ago

Hi, we don't officially support asp.net, so we didn't change anything that could change the default behavior in asp.net. It looks like a code error. I don't know much about asp.net, but shouldn't that be asp-route-id = "@item.Id" ?



Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Opened

Specification of the issue

  • ForumUser: Free
  • Premium support: No
  • Technology: MDB jQuery
  • MDB Version: 4.19.0
  • Device: PC
  • Browser: Chrome, Edge
  • OS: Web App
  • Provided sample code: Yes
  • Provided link: No