try to explain a litter further on what needs to be done. It was a bit confusing.. or if you could provide a link?
Also, in your javascript, you're not declaring where the form sits. Set a var = document.forms.form1 and then call it everytime you need it. So this means change your javascript code to:
<script language="Javascript" type="text/javascript">
function ChkAllCustomerClick()
{
var identity = document.forms.form1;
if(identity.ChkAllCustomer.checked == true)
{
identity.TxtCustomerId.value = "";
identity.TxtCustomerName.value = "";
identity.CmdLocateCustomer.disabled = true;
identity.CmbDept.disabled = false;
}
else
{
identity.CmdLocateCustomer.disabled = false;
identity.CmbDept.disabled = true;
}
}
</script> As for the rest of your code, keep in mind that when it is rendered on page, the ID for that code is different then you chose for it to runat server. View Source on your browser after running the code. Try not to use runat server controls if you don't have to. HTML controls are faster and obviously don't use server resources. So for your cmdLocate button or whatever, make that an HTML button and disabled="disabled" value. This should solve your problem.