I'm trying to disable a group of controls based on a text box. if the user has entered a value in that text box the controls should be enabled and if the user deletes value or if it remains empty the controls should be disabled.
assume your text box ID is TxtBoxName and assume you put your controls inside div or any other container and its name is controls , the following is my solution
$('#TxtBoxName').on('change',function(){
if($(this).val().length == 0)
{
$('#controls').attr('disabled','disabled');
}
else
{
$('#controls').removeAttr('disabled');
}
})