I have a bunch of dynamically created checkboxes that I add to the a
label in the html through my C# code. Then I also have a javascript
function that goes through and identifies which checkboxes are checked
when the user clicks on the submit button. My question now is, how
would I go about getting the list of checked boxes back to my C#
program? I am not sure if you can pass an array from javascript to C#
or even exactly how you create an array in javascript. However, my
code for finding the checked boxes is like this :
function Select(x){
l=document.form1;
n=l.elements.length;
var i=0;
for(i=0;i<n;i++){
if(l.elements[i].type=='checkbox' &&
l.elements[i].checked){
// Add element value to the array
}
}
}
any help would be greatly appreciated.
Thanks,
Dan