<p>What is the best solution of defaultButton and "Enter key pressed" for ASP.NET 2.0-3.5 forms?</p>

[{'answer_id': 68700, 'author': 'Wayne', 'author_id': 8236, 'author_profile': 'https://Stackoverflow.com/users/8236', 'pm_score': 2, 'selected': False, 'text': '<p>Just add the "defaultbutton" attribute to the form and set it to the ID of the button you want to be the default. </p>\n\n<pre>&lt;form defaultbutton="button1" runat="server"&gt;\n    &lt;asp:textbox id="textbox1" runat="server"/&gt;\n    &lt;asp:button id="button1" text="Button1" runat="server"/&gt;\n&lt;/form&gt; </pre>\n\n<p>NOTE: This only works in ASP.NET 2.0+</p>\n'}, {'answer_id': 68866, 'author': 'Wayne', 'author_id': 8236, 'author_profile': 'https://Stackoverflow.com/users/8236', 'pm_score': 2, 'selected': False, 'text': '<p>Since form submission on hitting the enter key is a part of life with HTML, you\'ll have to trap the Enter key using javascript and only allow it to go through when it\'s valid (such as within textareas).  Check out <a href="http://brennan.offwhite.net/blog/2004/08/04/the-single-form-problem-with-aspnet/" rel="nofollow noreferrer"><a href="http://brennan.offwhite.net/blog/2004/08/04/the-single-form-problem-with-aspnet/" rel="nofollow noreferrer">http://brennan.offwhite.net/blog/2004/08/04/the-single-form-problem-with-aspnet/</a></a> for a good explanation.</p>\n'}]
['https://Stackoverflow.com/questions/68688', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/10778/']