<p>I am building a server control that will search our db and return results.  The server control is contains an ASP:Panel.  I have set the default button on the panel equal to my button id and have set the form default button equal to my button id.</p>
<p>On the Panel:</p>
<pre><code> MyPanel.DefaultButton = SearchButton.ID</code></pre>
<p>On the Control:</p>
<pre><code>Me.Page.Form.DefaultButton = SearchButton.UniqueID </code></pre>
<p>Works fine in IE &amp; Safari I can type a search term and hit the enter key and it searches fine.  If I do it in Firefox I get an alert box saying &quot;Object reference not set to an instance of an a object.</p>
<p>Anyone run across this before?</p>

[{'answer_id': 6096, 'author': 'Otto', 'author_id': 519, 'author_profile': 'https://Stackoverflow.com/users/519', 'pm_score': 2, 'selected': False, 'text': '<p>Is SearchButton a LinkButton?  If so, the javascript that is written to the browser doesn\'t work properly.</p>\n\n<p>Here is a good blog post explaining the issue and how to solve it: </p>\n\n<p><a href="http://kpumuk.info/asp-net/using-panel-defaultbutton-property-with-linkbutton-control-in-asp-net/" rel="nofollow noreferrer">Using Panel.DefaultButton property with LinkButton control in ASP.NET</a></p>\n'}, {'answer_id': 6097, 'author': 'Bryan Roth', 'author_id': 299, 'author_profile': 'https://Stackoverflow.com/users/299', 'pm_score': 0, 'selected': False, 'text': '<p>I might be wrong and this might not make a difference but have you tried:</p>\n\n<pre><code>Me.Page.Form.DefaultButton = SearchButton.ID\n</code></pre>\n\n<p>instead of</p>\n\n<pre><code>Me.Page.Form.DefaultButton = SearchButton.UniqueID\n</code></pre>\n'}, {'answer_id': 7740, 'author': 'brendan', 'author_id': 225, 'author_profile': 'https://Stackoverflow.com/users/225', 'pm_score': 3, 'selected': True, 'text': '<p>Ends up this resolved my issue:</p>\n\n<pre><code>     SearchButton.UseSubmitBehavior = False\n</code></pre>\n'}]
['https://Stackoverflow.com/questions/6076', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/225/']