I have a page where I list checkboxes named TimeRange1, TimeRange2.... TimeRange7, and I generate them in a for loop like this:
<% for (int currentDay = 1; currentDay <= 7; currentDay++)
......<%= Html.CheckBox("TimeRange" + currentDay.ToString(), false)%>
Works fine til I post the form, then I get a "The string was not identified as a valid Boolean string."
Apparently the problem is that I concatenate the name of the checkbox.
Is there some neat way of fixing this? I need to have them named 1-7. It's like a big schedule where you select which times should be available.