Default button not working in asp.net panel

若如初见. 提交于 2019-11-28 12:29:43

The first thing that I like to point here is that the default button is the control that is pressed when the focus is on one of the controls that exist inside this Panel, and not the rest of the page.

The main reason for your issue is because inside this Panel you do not have anything (else than buttons) that can keep the focus of the keyboard and send the enter to the default button.

Something like a text editor, for example: if you place a text editor inside the panel, click on it and then press enter, the default button will be fired.

So when the focus is inside this panel is on a button, and when you press enter the selected button is pressed, not the default one.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!