Link to home
Start Free TrialLog in
Avatar of clooak
clooak

asked on

Failing at returning radiobuttonlist selected item value custom control with radiobuttonlist

Hello!

Im having one annoying problem with the project im working on...
Im trying to return the seleted item value from a custom control all im getting is when trying to run the script is "When casting from a number it must be less than infinity" and it means something like the seletected radiobuttonlistitem does not have a value, even though  I know it has

See the code examples!

Ive left out the code for adding the info just so you know

Appreciate any help I can get!

Im adding the the content to the radioboxlist1 control here and Im also setting the value of an item 
Public Sub AddItemsCheckBoxList(ByVal alt As String, ByVal pointsgiven As String)
        RadioButtonList1.Items.Add(alt)
        RadioButtonList1.Items.Item(counter).Value = pointsgiven
 
        counter = counter + 1
    End Sub
'''''' 
Here, I want to be able to retrieve the selected value but im getting nothing at all even though I know it should be working
''''''''
 Public ReadOnly Property getPointsGiven() As String
        Get
            Return RadioButtonList1.SelectedValue
        End Get
   End Property

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of clooak
clooak

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial