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

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
 
S

Scott D Johnson

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

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,731
Messages
2,569,432
Members
44,832
Latest member
GlennSmall

Latest Threads

Top