I'm quite confident the other answer is probably what you want. But just in
case, if you have multiple "default" buttons based upon different text
boxes, this javascript could come in handy: (e.g. a bunch of textbox /
button pairs and you want enter to "submit" based on the textbox the user is
currently in...)
if it's a windows form then, set the AcceptButton Property
of Form to the ButtonX. And another important thing is
setting the tab order of the ButtonX to 0.