按下文本框中的enterkey按钮单击事件 [英] button click event on pressing enterkey in textbox

查看:93
本文介绍了按下文本框中的enterkey按钮单击事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



当用户使用c#编码在文本框中按回车键时,我需要触发按钮点击事件。我使用了masterpage,因此没有表单标签。我尝试使用面板,但是有一些问题..帮助我..

Hi,
I need to fire the Button click event when the user press enter key in the textbox using c# coding. I have used masterpage so there is no form tag. I tried using panel but there are some issues with that..help me..

推荐答案

将所有页面包含在面板中并将DefaultButton属性设置为提交按钮。

Take all your page contains in a panel and set DefaultButton property to your submit button.
<asp:panel runat="server" id="pnlSrchQuote" defaultbutton="btnSearch" xmlns:asp="#unknown">
     <!--My Controls here-->
</asp:panel>





--Amit



--Amit


这篇关于按下文本框中的enterkey按钮单击事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆