Enter key press

Posted on 2012-09-10
Last Modified: 2012-09-10
How can I add an event to textbox1? When Enter key is pressed in a webform, I want it to fire an event?
Question by:VBdotnet2005
    LVL 20

    Accepted Solution

    <asp:TextBox id="txt1" runat="server">
    <asp:Button id="btn1" runat="server" Text="This button shd be fired" UseSubmitBehavior="true" OnClick="btn2_Click"></asp:Button>
    <asp:Button id="btn2" runat="server" Text="Some other button" ></asp:Button>

    Open in new window


    Author Comment


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Free Trending Threat Insights Every Day

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (…
    International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
    how to add IIS SMTP to handle application/Scanner relays into office 365.
    Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now