Classic asp radiobutton groups get values
Is there a way to iterate radio groups on a form post to do something with each radio button group? I have a varyin开发者_Go百科g number of radio button sets and need to get values and id's out of each of them on a postback.
I'm not sure this is what you're looking for, but it might point you in the right direction. If you prefix all names of your radio buttons with "rb" (or some other prefix of your choosing), then the following should give you access to each radio button on a post:
for x = 1 to Request.Form.count()
if(Left(Request.Form.key(x),2) = "rb") then
Response.Write(Request.Form.key(x) & " = " & Request.Form.item(x) & "<br/>")
end if
next
精彩评论