>I have a webform with two submit buttons. I would like to control which submit button that the Enter keypress initiates by whether there is text in certain textboxes. Anybody know how I can do this?
I added this attribute to my textbox and bingo!
TextBox1.Attributes.Add("onkeydown", "if(event.which || event.keyCode){if ((event.which == 13) || (event.keyCode == 13)) {document.getElementById('"+Button1.UniqueID+"').click();return false;}} else {return true}; ");