RadioButtonList, validation and properties

Results 1 to 2 of 2

Thread: RadioButtonList, validation and properties

  1. #1
    Join Date
    Dec 1969

    Default RadioButtonList, validation and properties

    Hi all, <BR><BR>I&#039;m I correct in that the RadioButtonList does not have an EnableValidation property? <BR><BR>It does have an &#039;enabled&#039; property, but validation still occurs even though the control has been disabled. <BR><BR>Here is my scenerio: <BR><BR>I have two radiobutton lists: <BR><BR>RadioButtonList 1: <BR>ListItem value of Yes <BR>ListItem value of No <BR><BR>RadioButtonList 2: <BR>ListItem value of Yes <BR>ListItem value of No <BR><BR>If the user selects Yes in R1, R2 needs to be validated AND a selection made. If the user selected No in R1, no validation OR selection needs to be made in R2. How would I accomplish this? <BR><BR>Cheers, <BR>David

  2. #2
    Join Date
    Dec 1969

    Default RE: RadioButtonList, validation and properties

    HI..<BR> This is the code piece that I tried and it works..<BR><BR> Private Sub RadioButtonList1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButtonList1.SelectedIndexChanged<BR> If RadioButtonList1.SelectedIndex = 0 Then<BR> RadioButtonList2.Enabled = True<BR> RadioButtonList1.Enabled = False<BR> End If<BR> End Sub<BR><BR>Jus look to it that initially .. <BR>1. List1.Autopostback = true<BR>2. list2.enabled = false<BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts