Hi @KALYANA ALLAM,
First set Visible="false" to hide the "Normal/Pregnant" radio button, then use the OnCheckedChanged event in the Male/Female radio button and set postback: AutoPostBack="true".
<asp:RadioButton ID="Male" runat="server" Text ="Male" GroupName="gender" AutoPostBack="true" OnCheckedChanged="Male_OnCheckedChanged" />
<asp:RadioButton ID="Female" runat="server" Text ="Female" GroupName="gender" AutoPostBack="true" OnCheckedChanged="Female_OnCheckedChanged" /> <br/>
<asp:RadioButton ID="Nor" runat="server" Text ="Normal" GroupName="preg" Visible="false" />
<asp:RadioButton ID="Preg" runat="server" Text ="Pregnant" GroupName="preg" Visible="false" /> <br/>
protected void Male_OnCheckedChanged(object sender, EventArgs e)
{
Nor.Visible = false;
Preg.Visible = false;
}
protected void Female_OnCheckedChanged(object sender, EventArgs e)
{
Nor.Visible = true;
Preg.Visible = true;
}
Best regards,
Lan Huang
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.