This control can be extended to ASP. net checkbox, a group of check boxes that add this extension only need to set the same key, then only one check box can be selected at a time (checked), similar to radio button. The use of checkboxes however allows you to choose to uncheck a value which is not possible normally with radio buttons. this also provides a more consistent and expected interface than using JavaScript to allow the de-selection of a radiobutton item.
< ASP: scriptmanager ID = "Scriptmanager1" Runat = "Server" />
< Div >
< BR />
< Table >
< Tr >
< TD Style = "Width: 163px; Height: 30px ;" >
Is over 25 years of age
</ TD >
< TD Style = "Width: 186px; Height: 30px ;" >
Is over 35 years of age
</ TD >
< TD Style = "Width: 186px; Height: 30px ;" >
Is over 45 years of age
</ TD >
</ Tr >
< Tr >
< TD Style = "Width: 163px" >
< ASP: checkbox ID = "Isover25" Runat = "Server" Text = "I am over 25 years old ." /> < BR />
< Ajaxtoolkit: mutuallyexclusivecheckboxextender ID = "Isover25ex" Runat = "Server" Targetcontrolid = "Isover25"
Key = "Agechoice" />
</ TD >
< TD Style = "Width: 186px" >
< ASP: checkbox ID = "Isover35" Runat = "Server" Text = "I am over 35 years old ." /> < BR />
< Ajaxtoolkit: mutuallyexclusivecheckboxextender ID = "Isnotover35ex" Runat = "Server"
Targetcontrolid = "Isover35" Key = "Agechoice" />
</ TD >
< TD Style = "Width: 186px" >
< ASP: checkbox ID = "Isover45" Runat = "Server" Text = "I am over 45 years old ." /> < BR />
< Ajaxtoolkit: mutuallyexclusivecheckboxextender ID = "Isnotover5ex" Runat = "Server" Targetcontrolid = "Isover45"
Key = "Agechoice" />
</ TD >
</ Tr >
</ Table >
Targetcontrolid-The ID of the checkbox to modify.
Key-The unique key to use to associate checkboxes. This key does not respect inamingcontainer renaming.