As far as I know, if you press ENTER on a ASP page it goes to the first input button with an image.
so far i tried 2 things in catching ENTER.
1. I put a HTML input button and invisible DTC with the same name on the page. DTC button onclick event contains all the code:
Sub btnEnter_onclick()
...your code...
end sub
The INPUT button calls that event:
<input id="btnEnter" onclick="thisPage._fireEvent('btnEnter', 'onclick'); return false;" type="image" alt="enter" src="images/blah.gif" border="0" name="enter" WIDTH="69" HEIGHT="21">
2. You can catch the onkeypress event (for example) of one of your DTC textboxes.
Put advise method in thisPage_onenter function (it's a server side function)
Sub thisPage_onenter()
txtName.advise "onkeypress", "nofunc"
end sub
Then catch the event on client side and cancel server round trip (you have to do this, because if you don't cancel it, it will call function nofunc, that in this case doesn't exist).
function thisPage_onbeforeserverevent(obj,event){
if (obj=="txtName"

{
if (event=="onkeypress"

{
if (window.event.keyCode=="13"

{
thisPage._fireEvent("btnEnter","onclick"

}
else
document.thisForm.txtName.value+=String.fromCharCode(window.event.keyCode);
thisPage.cancelEvent=true;
}
}
}
DTC button contains your code:
Sub btnEnter_onclick()
...your code...
end sub
Hope that helps you. The second example however works only in IE browser, I don't know what to do in Netscape.
If anyone knows a better way how to catch ENTER, please post it, i'd really like to know.