i hv written this piece of code. but it is for html checkbox and txtbox. i want to hv the same functionality with asp.net txtbox and checkbox.how to do it?
<script type="text/javascript">
$(document).ready(function() {
var checkbox = $('#notify');
var textfield = $('#notifyemailaddress');
checkbox.click(function() {
if (checkbox.is(':checked')) {
textfield.removeAttr("disabled");
textfield.removeClass("email");
}
else {
textfield.attr("disabled", "disabled");
textfield.addClass("email");
}
});
});
</script>
<div>
<input type="checkbox" id="notify"/>
<label for="notify">Notify</label>
<input type="text" id="notifyemailaddress" disabled="disabled" class="email" style="width:25%" />
</div>