Since i assume you would like to maintain the checkbox state during postback i'm adding my version of the dynamic checkbox generating code:
<%
Dim checkboxes
Dim i
checkboxes = Array(1, 2, 3, 4)
For i = 1 To (UBound(checkboxes) + 1)
Response.Write "<input type=""checkbox"" name=""checkGroup"" value=""" & i & """"
If (UBound(Filter(Request.Form("checkGroup"), i, True, 1)) > -1) Then
Response.Write " checked"
End If
Response.Write " />"
Next
%>
A second way to do this would be
<%
Dim checkboxes
Dim boxeschecked
Dim i
checkboxes = Array(1, 2, 3, 4)
boxeschecked = "," & Join(Request.Form("checkGroup"), ",") & ","
For i = 1 To (UBound(checkboxes) + 1)
Response.Write "<input type=""checkbox"" name=""checkGroup"" value=""" & i & """"
If Instr(boxeschecked, ("," & i & ",")) > 0 Then
Response.Write " checked"
End If
Response.Write " />"
Next
%>
I recall that using Instr() did perform better than other methods - better than looping over the array in any case.