Monday, December 17, 2007

How to collect the value of a multiple values from HTML Check Box

How to collect the value of a multiple values from HTML Check Box

S T E P - 1

- When you use some Check Boxes in your HTML form, they are using the same name but different values:

Value1

Value2

Value3

Value4


- When you send the form, the Form collection will generate a multi-value option for the CheckBox.

S T E P - 2

- Now, we can use For..loop to get the multi values:

<%

If Request.form("SameName").Count Then

For intLoop = 1 to Request.form("SameName").Count

Response.write (intLoop & ". " & Request.form("SameName")(intLoop) & "
")

Next

End If

%>


No comments: