Ajax Control Toolkit-mutuallyexclusivecheckbox

Source: Internet
Author: User

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.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.