I have an ASP page with lots of check boxes on it. I want to loop through each of them and check whether they have been checked. What I dont know is what the collection of objects in an asp page is called?
You could do somthing like this:
Note- you will only get those check boxes that
are checked.
dim oColl, oItem
' Determine collection to use
if Request.QueryString <> "" then
set oColl = Request.QueryString
else
set oColl = Request.Form
end if
' Loop through collection
for each oItem in oColl
oItem = ucase(oItem)
if left(oItem) = "chk" then
''''''do your logic here.
end if
next
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.