且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

默认按钮停止工作

更新时间:2023-12-04 23:12:46

I会说,当您隐藏面板时,再添加一行代码,这将把焦点设置在用户控件的控件之一上,该控件将使浏览器知道按Enter键时将触发默认按钮的焦点在哪里.
希望对您有所帮助.
I would say, when you hide the panel add one more line of code which would set focus on one of the control of user control which would let the browser know where is the focus now to fire default button when pressing enter.

Hope this helps.


尝试设置面板的defaultButton属性.
Try to set the defaultButton property of the panel.
<asp:Panel DefaultButton="MyBUttonId" />