I'm currently trying to get some values from checkboxes that are "posted" to another aspx page. My code looks something like this:
<form method = "post" action = "HubPageUpdate.aspx">
<input type = 'checkbox' name = 'customerBox' value = '0'>
<input type = 'checkbox' name = 'customerBox' value = '1'>
<input type = 'checkbox' name = 'customerBox' value = '2'>
<input type = 'checkbox' name = 'customerBox' value = '3'>
<input type = 'checkbox' name = 'customerBox' value = '4'>
<input type = "submit" value = "Update">
</form>
My code generates the checkboxes dynamically, so it's not really hard coded. The ASP.NET page it is posting to is then to take what's checked, and I'll does some SQL to it. However, when I was testing it out by just using a simple:
<% Response.Write(Request.Form("customerBox")) %>
It would return to me what's checked as:
1,2,3
Which means the checkbox works, and that delights me. However, because it's a string, I can't really do much with it because I need them individually for SQL queries. How can I get them individually, and not as a string? I first assumed an array, but I still am not sure how to get them individually. Thanks!