Failing at returning radiobuttonlist selected item value custom control  with radiobuttonlist

Posted on 2009-04-26
Last Modified: 2012-06-21

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.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


            Return RadioButtonList1.SelectedValue

        End Get

   End Property

Open in new window

Question by:clooak
    1 Comment

    Accepted Solution

    Ive got it working by adding the code to add the question/alternatives function  to page_init

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to improve team productivity

    Quip adds documents, spreadsheets, and tasklists to your Slack experience
    - Elevate ideas to Quip docs
    - Share Quip docs in Slack
    - Get notified of changes to your docs
    - Available on iOS/Android/Desktop/Web
    - Online/Offline

    Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
    In my previous two articles we discussed Binary Serialization ( and XML Serialization ( In this article we will try to know more about SOAP (Simple Object Acces…
    how to add IIS SMTP to handle application/Scanner relays into office 365.
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

    760 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    8 Experts available now in Live!

    Get 1:1 Help Now