After spending hours attempting to retrieve data from an array of checkboxes with the same name, I am still facing difficulties.
<input type="checkbox" name="node"/>
var selectedValues = [];
$(document.getElementsByName("node")).each(function () {
selectedValues.push($(this).checked);
});
$.ajax({
url: "/Summary/Test",
type: "POST",
data: selectedValues,
traditional: true
});
public void Test(string [] nodes)
{
}
I'm finding it challenging to identify where my mistake lies. Why is it not executing that particular line?