Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有用户列表表,我如何在 url 上导航:“../users/showprofile?userid="
当用户单击当前用户个人资料上的表格行导航时,我想制作表格
谢谢
在不使用 jQuery 的情况下,假设您处于如下所示的 foreach 循环中,只需将tr定义更改为:
tr
@foreach (var user in Model.Users) { <tr onclick="location.href = '@(Url.Action("ShowProfile", "Users", new { userId = user.UserId }))'"> //rest of your markup for that table row </tr> }