when you are adding the textbox control, add html attribute of onclick.
txtbxHowMany.Attributes.Add("onclick", "ValidateButton(this.id);");
Now, just write a JavaScript function with this name and write ou code of disabling button, let me know if more help needed>