RadioButton

S

SAI

Scenario:
2 sets of radio button. Set 1 groupname is "Gender". Choices are ID "Male"
and "Female". Set 2 groupname is "IsAdult". Choices are "YES" and "NO". Now
I want to focus check a group. e.g. check Male or Female is checked. Now I
write "if (Male.Check == true) return MALE else if (Female.Checked==true)
return FEMALE;" I feel this skill is quit "hard code". Is there any good
solution to do it. e.g I can focus to check the "group name" in "Gender" and
use a for loop to check all related "Gender" radio button. Check which one
is pressed. Is it ok? Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,058
Latest member
QQXCharlot

Latest Threads

Top