有是一个ContentPage一个文本框。当用户presses在文本框中输入我试图开枪这个ContentPage一个提交按钮。我想断火特定按钮的事件。
There is a textbox on a ContentPage. When the user presses Enter in that textbox I am trying to fire a 'Submit' button on this ContentPage. I'd like to fire off that particular button's event.
相反,还有一个搜索文本框中&放大器;从一个母版页面的顶部,这个搜索按钮的事件触发按钮关闭。
Instead, there is a search textbox & button on the top of the page from a MasterPage, and this search button's event fires off.
我如何控制火关闭此ContentPage的提交按钮,而不是母版的搜索按钮?
How do I control to fire off this ContentPage's submit button, instead of the MasterPage's search button?
我使用CMS晔对我的内容管理。
I am using Ektron CMS for my content management.
推荐答案最简单的方法就是把字段和按钮面板内,设置默认按钮,你想上输入激活的按钮。
The easiest way is to put the fields and button inside of a Panel and set the default button to the button you want to be activated on enter.
<asp:Panel ID="p" runat="server" DefaultButton="myButton"> <%-- Text boxes here --%> <asp:Button ID="myButton" runat="server" /> </asp:Panel>更多推荐
如何在一个特定的按钮,设置一个默认的'输入'
发布评论