This code will help you populate your checkbox dynamically and will show you a customized message based on your selection.
Code:
<html>
<body>
You have a form with checkboxes that you want to populate dynamically. Here's one way...
<%orderStatus = Request.Form("status")
'taking the value of status
<form action="process.asp" action="post">
<input type="checkbox" name="status" value=1 >
<% If orderStatus = "1" Then Response.Write "CHECKED" %>>Car<br>
'checking the value if it is one writing that you had checked car
<input type="checkbox" name="status" value=2 >
<% If orderStatus = "2" Then Response.Write "CHECKED" %>>Scooter<br>
'checking the value if it is two writing that you had checked scooter <input type="checkbox" name="status" value=3 >
<% If orderStatus = "3" Then Response.Write "CHECKED" %>>None<br>
</form>
The value of orderStatus determines which checkbox was checked.
</body>
</html>
Bookmarks