There is a grid (only the html table) in which users are listed, and you can delete a specific user by clicking the delete link. The usual way is
<% foreach (var user in Model.Users) {%>
<tr >
<td align="right"><%= user.Name %></td>
<td><%= user.Level %></td>
<td align="center">
<a href="#" onclick="return deleteUser('<%= user.Name %>');">
<%= Html.Image("trash.gif") %>
</a>
</td>
</tr>
<% )%>
but I want to bind the click event to the link in an unobtrusive way. I mean that I do not want to specify the javascript method inside the tag. I'm not sure if this is the best way to achieve this with jQuery, by binding multiple multiple anchor tags with parameter passing.
source
share