Home Trying to retain selected checkbox/radio buttons value if previously selected

# Trying to retain selected checkbox/radio buttons value if previously selected

HyperPXLZ
1#
HyperPXLZ Published in 2017-11-14 14:27:23Z
 @Request.Form["Gender"] == "Male" ? "selected" : ""  Keeps saying I'm missing name attribute.
Hartanto
2#
 You need to save the value of radiobutton to your database. Then create conditional. If radiobutton just 2 options, use if conditional to keep selected radiobutton. And if more than 2 options you can use switch conditional. This is sample of radiobutton:  Male Female Other  The script to keep selected radiobutton:   "Model.Gender" is the way used to call the value stored in the database.