Default Form Button in FireFox

I am constructing a server control that will certainly search our db and also return outcomes. The server control is has an ASP: Panel. I have actually set the default switch on the panel equivalent to my switch id and also have actually set the kind default switch equivalent to my switch id.

On the Panel:

 MyPanel.DefaultButton = SearchButton.ID

On the Control:

Me.Page.Form.DefaultButton = SearchButton.UniqueID 

Works penalty in IE & Safari I can type a search term and also struck the enter key and also it looks penalty. If I do it in FireFox I get a sharp box claiming "Object reference not set to an instance of an a object.

Any person stumble upon this prior to?

2019-05-18 21:28:04
Source Share
Answers: 3

Ends up this settled my concern:

     SearchButton.UseSubmitBehavior = False
2019-05-21 04:59:04

Is SearchButton a LinkButton? If so, the javascript that is contacted the internet browser does not function effectively.

Below is an excellent post clarifying the concern and also just how to address it:

Using Panel.DefaultButton property with LinkButton control in ASP.NET

2019-05-21 04:10:44

I could be incorrect and also this could not make a distinction yet have you attempted:

Me.Page.Form.DefaultButton = SearchButton.ID

as opposed to

Me.Page.Form.DefaultButton = SearchButton.UniqueID
2019-05-21 04:10:02