zoukankan      html  css  js  c++  java
  • AJAX Control toolkit MutuallyExclusiveCheckBox

    该控件可以扩展到ASP.NET CheckBox,一组都添加该扩展的复选框只要设置相同的key,那么一次就只有一个复选框能被选中(Checked),类似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=" 163px; height: 30px;">
    IS over 25 Years of Age
    </td>
    <td style=" 186px; height: 30px;">
    IS over 35 Years of Age
    </td>
    <td style=" 186px; height: 30px;">
    IS over 45 Years of Age
    </td>
    </tr>
    <tr>
    <td style=" 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=" 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=" 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.

      

  • 相关阅读:
    JDK线程池原理之一:工作原理
    Hystrix Feign 特定状态码不熔断
    Hystrix熔断的方法级别(自定义commonKey)
    谨慎使用Exception
    FunctionalInterface~一个批量处理数据的类
    keycloak~账号密码认证和授权码认证
    keycloak~OIDC&OAuth2&自定义皮肤
    docker~添加hosts绑定的方法
    docker~产生的IP段与现有IP冲突问题
    高中数学知识要点及解题方法精粹[网摘]
  • 原文地址:https://www.cnblogs.com/January/p/2134487.html
Copyright © 2011-2022 走看看