<asp:CheckBox id='CheckBox1' runat='server'></asp:CheckBox>
<asp:TextBox id='TextBox1' runat='server'></asp:TextBox>
<script type='text/javascript'>
function chkTextEntered()
{
document.getElementById('CheckBox1').checked = true;
if(document.getElementById('TextBox1').value =='' )
{
document.getElementById('CheckBox1').checked = false;
}
}
</script>
In Page_Load
VB.NET
TextBox1.Attributes.Add('onKeyDown', 'chkTextEntered();')
C#
TextBox1.Attributes.Add('onKeyDown', 'chkTextEntered();');
Share with