Nov 25

Try the following,

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>CheckBox Toggle</title>

    <script type="text/javascript">

function aspcheck1True()
{
document.getElementById("CheckBox2").checked = false;
}

function aspcheck2True()
{
document.getElementById("CheckBox1").checked = false;
}

    </script>

</head>
<body>
    <form id="form1" runat="server">
        <div>
            <asp:CheckBox ID="CheckBox1" runat="server" onclick="aspcheck1True();" />
            <asp:CheckBox ID="CheckBox2" runat="server" onclick="aspcheck2True();" />
        </div>
    </form>
</body>
</html>

Watch the live action,

 

Tags: | |

Comments

Add comment


 

  Country flag

biuquote
  • Comment
  • Preview
Loading