lundi 25 avril 2016

how to get value of unchecked checkbox in C#

I am dynamically creating checkbox.

Lets say i add another 2 checkbox by clicking add button which I have written. Now I have

 <input id="personalized1"  name="personalized" type="checkbox" class="form-control" />

 <input id="personalized2"  name="personalized" type="checkbox" class="form-control" />

 <input id="personalized3"  name="personalized" type="checkbox" class="form-control" />

when I submit I am trying to get a list of both checked and unchecked by doing Request.Form("personalized"); but I get ["ON","ON"]. I am not able to get unchecked value.




Aucun commentaire:

Enregistrer un commentaire