jeudi 30 juin 2016

how to get all selected checkboxes in razor

Working with a checkboxes, and stucked in transfer selected checkboxes to backend. I've an idea how to do this, but I want to hear another variants. So I've a table with checkboxes:

<td>
    <input type="checkbox" class="check" value="@item.Id"/>
</td>

And submit button

@Html.ActionLink(R("Удалить"), "DeleteSelectedPictures")

So my variant is to add bool property and change table from input to @html.checkboxfor(_ => _.selected), and how then get these selected items? Is there others way how to solve this problem?




Aucun commentaire:

Enregistrer un commentaire