I was creating a search page and I require that when user press enter key, by default search button’s click event should be fire. I look around for the solution and find the easiest one. You just need to write below line in page load of your code behind file.
Form.DefaultButton = btnSubmit.UniqueID;
Here btnSubmit is the name of button.