在文本框中输入登录 [英] Enter in the textbox to login

查看:59
本文介绍了在文本框中输入登录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我在文本框中输入内容,那么我需要处理loginButton的click事件,而无需转到按钮中的光标

if i enter in the textbox then i need to work click event of the loginButton without go to the cursor in the button

推荐答案

看看这个

http://csharpdotnetfreak.blogspot.com/2008/12/aspnet-submit-form-on-enter-key-default.html [
Look at this

http://csharpdotnetfreak.blogspot.com/2008/12/aspnet-submit-form-on-enter-key-default.html[^]


将表单的defaultbutton设置为登录按钮.
Set the defaultbutton of the form to the login button.
<form id="form1" runat="server" defaultbutton="btnLogin">


将控件包装在Panel中,并将DefaultButton属性设置为将导致提交的按钮的ID.

请参见
此处 [ ^ ].
Wrap the controls in an Panel and set the DefaultButton property the id of the button that will cause the submit to happen.

See here[^].


这篇关于在文本框中输入登录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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