How to Show/Hide Text field based on radio button values with VB in .aspx
Posted on 2014-03-04
I am new to vb.net and have to change code to display a text field for more than one condition.
Right now, the text box only displays for one radio button list value. I'd like it to display for two values, but there is also an N/A value. The values are Not Safe, Safe, and N/A
The code is as follows:
I changed it to Showtxtfield(strID, True) to display regardless of the value of the radio button, but that displays it for all three radio button values, and I only want it for two, not the third, which is N/A. The subroutine for Showtxtfield is as follows:
Private Sub Showtxtfield(ByVal strID As String, ByVal blnShow As Boolean)
' Show the text box and radio buttons
tblCategory.FindControl("pnlQuestion1" & strID).Visible = blnShow
Thanks for any help.