如何在没有任何按钮的情况下在ASP.NET的文本框中调用enter事件 [英] How to call enter event in textbox in ASP.NET without any button

查看:78
本文介绍了如何在没有任何按钮的情况下在ASP.NET的文本框中调用enter事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在asp.net中真的很新,我不知道如何使用输入事件在没有任何按钮或单击按钮的情况下捕获文本框中的值。



< b>我尝试了什么:



i尝试将其置于面板内并将搜索按钮设为默认但我不想要任何按钮,因为它会影响我的ui,我需要一个简单的无按钮。



i really new in asp.net i don't know how to capture the value in a textbox using enter event without any button or click buttons.

What I have tried:

i tried putting this inside of a panel and make the search button as a default but i dont want any button because it will affect my ui, i need a simple no buttons please.

Search :
                           <asp:TextBox ID="txtSearch" runat="server" ValidationGroup="search" Width="167px"></asp:TextBox>
                            
                           <asp:Button ID="btnSearch" runat="server" ValidationGroup="search" OnClick="btnSearch_Click" Text="Search" />

推荐答案

看一下onTextChanged事件
Take a look at the onTextChanged event


这篇关于如何在没有任何按钮的情况下在ASP.NET的文本框中调用enter事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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