Click here to Skip to main content
15,895,656 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i am having two radio buttons eg;radiobutton1=recommend by
radiobutton1=same as above


when i click same as above radio button text boxes should be made read only and no validations should be done but on clicking recomend by radio button textbox validation should be done
how to do?
Posted

1 solution

You may adapt the following code snippet to suit your need:

VB
' auto switch the readable state according to check state of radiobutton2
TextBox1.ReadOnly = RadioButton2.Checked

If RadioButton1.Checked = True Then

    ' put your validation code here

    MsgBox("Run validation code")

End If
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900