<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="Default2.aspx.cs" Inherits="Default2" Title="Untitled Page" %> <asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"> <script language="javascript" type="text/javascript" > function chvisible(controlId) { var control = document.getElementById(controlId); if(control.style.display == "none" || control.style.display == "") control.style.display = "block"; control.body.text=""; else control.style.display = "none"; } </script> <asp:TextBox ID="TextBox1" runat="server" Style="display: none"></asp:TextBox> <input id="Checkbox1" type="checkbox" onclick="chvisible('<%=TextBox1.ClientID %>');"/> </asp:Content>
"chvisible('<%=TextBox1.ClientID %>');"
<asp:CheckBox ID="CheckBox2" runat="server" OnCheckedChanged="chvisible('<%=TextBox1.ClientID %>');" />
<asp:CheckBox ID="CheckBox1" runat="server" onclick="chvisible('<%=TextBox1.ClientID %>');" Text="sport" />
<asp:checkbox id="CheckBox2" runat="server" xmlns:asp="#unknown" />
CheckBox2.InputAttribute.Add("onchange","chvisible('" +TextBox1.ClientID + "');")
CheckBox2.InputAttribute.Add("onclick","chvisible('" +TextBox1.ClientID + "');")
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)