如何在一个特定的按钮,设置一个默认的'输入'

编程入门 行业动态 更新时间:2024-10-11 07:30:26
本文介绍了如何在一个特定的按钮,设置一个默认的'输入'的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

有是一个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>

更多推荐

如何在一个特定的按钮,设置一个默认的'输入'

本文发布于:2023-11-24 11:47:40,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1625079.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:按钮   如何在

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!