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

  • Thread starter Thread starter Scott D Johnson
  • Start date Start date
S

Scott D Johnson

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
 
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;
}
 
Back
Top