Radio buttons are appropriate when the visitor should choose exactly one value from a group. Give every radio button in the group the same name and a different value.
<form method="post" action="radio-check.asp">
<label><input type="radio" name="choice" value="yes"> Yes</label>
<label><input type="radio" name="choice" value="no"> No</label>
<button type="submit">Submit</button>
</form>
The receiving ASP page can read the selected value directly:
Dim choice
choice = Request.Form("choice")
Response.Write Server.HTMLEncode(choice)
If no radio button is selected, the submitted value can be empty. Validate the result against the values your application allows instead of trusting arbitrary request text.
Author & Instructor at plus2net
I write and maintain practical tutorials on Python, PHP, SQL, JavaScript, HTML, jQuery, and web development at plus2net. The tutorials focus on clear explanations, working examples, and code that readers can test and adapt while learning.