asp.net文本框控件 [英] asp.net textbox control

查看:78
本文介绍了asp.net文本框控件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,

i有一个文本框控件,所以如何将此文本框控件的焦点设置为按钮,这样当我们在文本框中键入一些文本并按Enter键时,按钮点击事件自动触发



谢谢&问候

srishti

解决方案

 < ;   asp:Panel     id   =  panel1    runat   =  server    DefaultButton   =  Button1  >  
< asp:TextBox id = textbox1 runat = server / >
< asp:按钮 id = Button1 runat = server 文字 = 按钮1 / >
< / asp:Panel >


hello,
i have a text box control so how can be set focus of this text box control to button so that when we type some text in text box and press enter then button click event fired automatically

thanks & regards
srishti

解决方案

<asp:Panel id="panel1" runat="server" DefaultButton="Button1">
   <asp:TextBox id="textbox1" runat="server" />
   <asp:Button id="Button1" runat="server" Text="Button 1" />
</asp:Panel>


这篇关于asp.net文本框控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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