ASP pages are often used to both display a form, and carry out the action once the form is submitted. One of the most annoying tasks of HTML/ASP forms programing is keeping a user's chosen radio buttons selected when redrawing the form after it has been submitted. The following code is one way to create a one ASP page form that has persistent radio buttons:
<HEAD><TITLE>Pick a color</TITLE></HEAD>
<BODY BgColor=<%= Request.Form("Color")%>>
RedChecked = ""
BlueChecked = ""
YellowChecked = ""
SELECT CASE Request.Form("Color")
RedChecked = "CHECKED"
BlueChecked = "CHECKED"
YellowChecked = "CHECKED"
Pick a color:<BR>
Red: <INPUT Type=Radio Name=Color Value=Red <%= RedChecked%>>
Blue: <INPUT Type=Radio Name=Color Value=Blue <%= BlueChecked%>>
Yellow: <INPUT Type=Radio Name=Color Value=Yellow <%= YellowChecked%>>