Radiobuttons

Discussion in 'ASP .Net' started by Eric, Jun 10, 2010.

  1. Eric

    Eric Guest

    Hi,

    I have a lot of radiobuttons on my page, grouped by 3. (yes/No/NA).
    For the user to click them and change the checked one, all is ok.
    I can also read them and put the data in a file.

    Now I want to do vice versa.
    I read the file and want to set the radiobuttons to what state was stored in
    the file.

    The radiobuttons do not change.
    Even without the file, if I just put rbYes.checked = true in my page.load
    code, it still doesn't change (default = rbNA).

    How can I overcome this?
    I can change the contents of textboxes on de page the same way, but not
    radiobuttons.

    pls. help me.
    Eric
     
    Eric, Jun 10, 2010
    #1
    1. Advertising

  2. Eric

    Eric Guest

    ah, found it. I have to set the one that was checked by default to false.


    "Eric" wrote:

    > Hi,
    >
    > I have a lot of radiobuttons on my page, grouped by 3. (yes/No/NA).
    > For the user to click them and change the checked one, all is ok.
    > I can also read them and put the data in a file.
    >
    > Now I want to do vice versa.
    > I read the file and want to set the radiobuttons to what state was stored in
    > the file.
    >
    > The radiobuttons do not change.
    > Even without the file, if I just put rbYes.checked = true in my page.load
    > code, it still doesn't change (default = rbNA).
    >
    > How can I overcome this?
    > I can change the contents of textboxes on de page the same way, but not
    > radiobuttons.
    >
    > pls. help me.
    > Eric
    >
     
    Eric, Jun 10, 2010
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Sean
    Replies:
    1
    Views:
    390
    Ken Cox [Microsoft MVP]
    Aug 6, 2003
  2. RB

    RadioButtons & DataGrid

    RB, Aug 11, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    426
  3. Robert H
    Replies:
    0
    Views:
    456
    Robert H
    Dec 4, 2003
  4. Carlos
    Replies:
    0
    Views:
    288
    Carlos
    Feb 18, 2005
  5. =?Utf-8?B?Q2hyaXN0aWFhbiBOaWV1d2xhYXQ=?=

    Dynamically add RadioButtons in Repeater

    =?Utf-8?B?Q2hyaXN0aWFhbiBOaWV1d2xhYXQ=?=, May 26, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    982
    =?Utf-8?B?Q2hyaXN0aWFhbiBOaWV1d2xhYXQ=?=
    May 26, 2005
Loading...

Share This Page