ASP.NET Reset Radio Button in a group of Radio Buttons

Discussion in 'ASP .Net' started by Scott D Johnson, Sep 27, 2006.

  1. I am using Visual Studio .NET 2003 (I also have VS .NET 2005 installed)


    I have a group of four radio buttons, and button, to set the first radio
    button as checked. When I run the app, and say select the third radio
    button, then click the button, the method associated with the Click event of
    the button runs, but does not set the first Radio Button to a checked
    status.

    private void ResetrClick(object sender, System.EventArgs e)

    {

    FirstButton.Checked = true;

    }

    Any ideas? AutoPostBack is set to true for all of the Radio Buttons.

    THX

    Scott
     
    Scott D Johnson, Sep 27, 2006
    #1
    1. Advertising

  2. I changed the code to the following at it appears to work:

    private void ResetrClick(object sender, System.EventArgs e)
    {
    SecondButton.Checked = false;
    ThirdButton.Checked = false;
    FourthButton.Checked = false;
    FirstButton.Checked = true;
    }



    "Scott D Johnson" <> wrote in message
    news:...
    >I am using Visual Studio .NET 2003 (I also have VS .NET 2005 installed)
    >
    >
    > I have a group of four radio buttons, and button, to set the first radio
    > button as checked. When I run the app, and say select the third radio
    > button, then click the button, the method associated with the Click event
    > of the button runs, but does not set the first Radio Button to a checked
    > status.
    >
    > private void ResetrClick(object sender, System.EventArgs e)
    >
    > {
    >
    > FirstButton.Checked = true;
    >
    > }
    >
    > Any ideas? AutoPostBack is set to true for all of the Radio Buttons.
    >
    > THX
    >
    > Scott
    >
    >
     
    Scott D Johnson, Sep 27, 2006
    #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. Bisser Milanov
    Replies:
    2
    Views:
    531
    Bisser Milanov
    Jun 26, 2003
  2. Replies:
    0
    Views:
    3,679
  3. Hiten
    Replies:
    1
    Views:
    632
    Vidar Petursson
    May 26, 2004
  4. Dr. Leff
    Replies:
    3
    Views:
    299
    David Mark
    Oct 15, 2007
  5. Dr. Leff
    Replies:
    3
    Views:
    231
    David Mark
    Oct 15, 2007
Loading...

Share This Page