I have an ASP.NET website and I have a forgot password page where the user enters their email address in a text box and when they click the button to retrieve password, the event runs as fine.

Only problem is if the user types in their email address and presses ENTER instead, it runs a search (I have a search bar at the top of the page) and so the result comes back as 'search query not found'. But this search bar at the top is on a different ASP.NET page.

So anyway, I want the event `onclick` to run when the user presses enter and not run a search query. Does anyone have any ideas? I've searched on this site but not really found the answer I need.