From what I understand, the control can only point to CheckBox objects.. so set up an Extender setting each TargetControlID to each checkbox.. and then use the Key to connect all the Extenders.. such as this:
1 <div id ="CheckBoxes">
2 <asp:CheckBox ID="CheckBox1" runat="server" />
4 <cc1:MutuallyExclusiveCheckBoxExtender ID="MutuallyExclusiveCheckBoxExtender1" runat="server" Key ="MyKey" TargetControlID="CheckBox1" />
6 <asp:CheckBox ID="CheckBox2" runat="server" />
8 <cc1:MutuallyExclusiveCheckBoxExtender ID="MutuallyExclusiveCheckBoxExtender1" runat="server" Key ="MyKey" TargetControlID="CheckBox2" />
10 <asp:CheckBox ID="CheckBox3" runat="server" />
12 <cc1:MutuallyExclusiveCheckBoxExtender ID="MutuallyExclusiveCheckBoxExtender1" runat="server" Key ="MyKey" TargetControlID="CheckBox3" />
14 </div>
Now.. my question for someone else.. What if you want Checkbox3 to be exclusive over Checkbox1 & Checkbox2.. such as if 3 were an optout and 1&2 were optin options? We can't share checkbox ID's nor can we encapulate the exender around the options with start/end tags. The Div attempt above might seem to work, but it does not.
Wait a minute.. ah ha! Looks like I answered my own question:
1 <div id="checkBoxes">
2 <ajax:ScriptManager ID="ScriptManager1" runat="server" />
3 <asp:CheckBox ID="BasicCheckBox" runat="server" Checked="True" Text="LSH events & news" />
4 <cc1:MutuallyExclusiveCheckBoxExtender ID="BasicCheckBoxEx" runat="server" TargetControlID="BasicCheckBox" Key="BasicKey" />
5 <asp:CheckBox ID="ArticlesCheckBox" runat="server" Text="Articles of interest (other news)" />
6 <cc1:MutuallyExclusiveCheckBoxExtender ID="ArticlesCheckBoxEx" runat="server" TargetControlID="ArticlesCheckBox" Key="ArticleKey" />
7 <asp:CheckBox ID="ActionCheckBox" runat="server" Text="Local action alerts" />
8 <cc1:MutuallyExclusiveCheckBoxExtender ID="ActionCheckBoxEx" runat="server" TargetControlID="ActionCheckBox" Key="ActionKey" />
9 <asp:CheckBox ID="EmailOptout" runat="server" OnCheckedChanged="EmailOptout_CheckedChanged" Text="Please REMOVE me from the LSH mailing list." />
10 <cc1:MutuallyExclusiveCheckBoxExtender ID="BasicOptout" runat="server" TargetControlID="EmailOptout" Key="BasicKey" />
11 <cc1:MutuallyExclusiveCheckBoxExtender ID="ArticlesOptout" runat="server" TargetControlID="EmailOptout" Key="ArticleKey" />
12 <cc1:MutuallyExclusiveCheckBoxExtender ID="ActionOptout" runat="server" TargetControlID="EmailOptout" Key="ActionKey" />
13 </div>
FYI, for all the other beginners such as myself. VS2k5 had a hissy fit if I didn't add the Scriptmanager (line 2).. and I had to place it right before the checkboxes for it to work correctly. And for that to work, I had to edit my Web.config file to replace the System.Web.Extensions
tagprefix="asp" to tagprefix="ajax"