Click here to Skip to main content
14,300,942 members
Rate this:
Please Sign up or sign in to vote.
See more:
three Radio button given in below code
1) first radio button select all checkbox select
2) second radio button select two checkbox select
how can do this???

<tabel>
                                <tr>
           <td>
           <asp:RadioButton ID="AllDaysRadioButton" runat="server" Text="All Days Select"
               GroupName="Days" >
           </td>
            </tr>
            <tr>
              <td>
           <asp:RadioButton ID="WeekdaysRadioButton" runat="server" Text ="Only Week Days"
               GroupName="Days" >
           </td>
            </tr>
            <tr>
              <td>
           <asp:RadioButton ID="WeekEndsDaysRadioButton" runat="server"
               Text="Only WeekEnds Days" GroupName="Days" AutoPostBack="True">
           </td>
           </tr>
           <tr>
           <td>
           <asp:CheckBox ID="MondayCheckBox" runat="server" Text="Monday" >
           <asp:CheckBox ID="TuesdayCheckBox" runat="server" Text="Tuesday">
           <asp:CheckBox ID="WednesdayCheckBox" runat="server" Text="Wednesday">
           <asp:CheckBox ID="ThursdayCheckBox" runat="server" Text="Thursday" >
           <asp:CheckBox ID="FridayCheckBox" runat="server" Text="Friday">
           <asp:CheckBox ID="SaturdayCheckBox" runat="server" Text="Saturday">
           <asp:CheckBox ID="SundayCheckBox" runat="server" Text="Sunday">
           </td>
           </tr>
           </tabel>
Posted
Updated 10-Feb-14 19:57pm
v3

1 solution

Rate this:
Please Sign up or sign in to vote.

Solution 1

if(AllDaysRadioButton.isChecked() == true)
{
    MondayCheckBox.Checked = true;
    TuesdayCheckBox.checked = true;
   // write all checkboxes for this..
}
if(WeekdaysRadioButton.isChecked() == true)
{
// enter weekend two checkboxes
}
</pre>
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100