在Firefox默认表单按钮 [英] Default Form Button in FireFox
问题描述
我建立一个服务器控件,将搜索我们的数据库,并返回结果。服务器控件包含一个ASP:面板。我已经设置了面板等于我的按钮标识上的默认按钮,并设置等于我的按钮ID形式默认按钮。
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.
在面板:
MyPanel.DefaultButton = SearchButton.ID
\r
\r
在控制:
On the Control:
Me.Page.Form.DefaultButton = SearchButton.UniqueID
\r
\r
在IE浏览器和功放做工精细; Safari浏览器,我可以输入搜索字词并按下Enter键,它搜索的罚款。如果我在FireFox做,我得到一个警告框说:对象未设置为一个对象的实例。
Works fine in IE & 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 "Object reference not set to an instance of an a object.
任何人碰到这个运行之前
Anyone run across this before?
推荐答案
结束了这个解决我的问题:
Ends up this resolved my issue:
SearchButton.UseSubmitBehavior = False
这篇关于在Firefox默认表单按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!