samedi 16 janvier 2021

ASP.NET I need a counter to show up in my View for the Checkboxes which are checked

I am looking for the following, for my Asp.Net Core Application:

counter

Just a number which is shown in the view, in a < div > or something similar, and that said number is updated, always indicating how many checkboxes I have marked in the view.

I don't know what is the usual method to show numbers in the View which are updated with an action, so I don't know how to do this, thanks in advance.

By the way, the view would have a number N of Checkboxes, with a code of the type:

<div class="wrapper">
 <div><input id=1 type="checkbox" name="group" value="Item 1" class="X"/>Item 1</div>
<div><input id=2 type="checkbox" name="group" value="Item 2" class="X"/>Item 2</div>
<div><input id=3 type="checkbox" name="group" value="Item 3" class="X"/>Item 3</div>
......
<div><input id=N type="checkbox" name="group" value="Item N" class="X"/>Item N</div>
</div>



Aucun commentaire:

Enregistrer un commentaire