Ajax's update panel provides an easy way of doing this. Just group your radio buttons (those that need to be enabled/disabled) inside one update panel such that (in your .aspx code):

 <asp:UpdatePanel ID="GroupUpdateTheseRadioButtons" runat="server" UpdateMode="Always">
                                              <td><asp:RadioButton ID="rbtn1" autopostback="false" runat="server" Text="bla bla bla1" GroupName="SendTo" CssClass="radiobtn"/></td>                                              
                                              <td><asp:RadioButton ID="rbtn2" autopostback="false"  runat="server" Text="bla bla bla2" GroupName="SendTo" CssClass="radiobtn"/></td>

then your triggering control:


                                             <td align="left"><asp:RadioButton ID="rbtnTRIGGER" autopostback="true" runat="server" Text="disableEnable" GroupName="TRIGGERGROUP" CssClass="radiobtn" Checked="True" oncheckedchanged="rbtnTRIGGER_CheckedChanged"/></td>


Then in your code behind (.aspx.cs)
  protected void rbtnTRIGGER_CheckedChanged(object sender, EventArgs e)

            if (rbtnTRIGGER.Checked)

Leave a Reply.

    About the Author

    The author have 12+ years experience in IT Industry with varying job roles from system developer/analyst/consultant positions. Majority of her development, implementation and systems support background focus on Financial/Banking/Credit Solutions.


    November 2010
    October 2010



    RSS Feed