Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > ASP.NET 1.1
|
ASP.NET 1.1 As of 10/6/2005, this forum is locked as part of the reorganization described here: http://p2p.wrox.com/topic.asp?TOPIC_ID=35394. No posts have been deleted. Open ongoing discussions from the last week have been moved to either ASP.NET 1.0 and 1.1 Beginners http://p2p.wrox.com/asp-net-1-0-1-1-basics-60/ or ASP.NET 1.0 and 1.1 Professional. http://p2p.wrox.com/forum.asp?FORUM_ID=50. See my sticky post inside for more.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.1 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 15th, 2005, 12:42 PM
Authorized User
 
Join Date: Jan 2005
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Default Adding event for enter key on text box

Hi,

I have a web form that has multiple text boxes with a button next to each, like for example 4 search boxs consecutively.

When someone clicks enter on the text box it submits the whole page and doesn't fire the event attached to the button next to the textbox.

In classic asp i would use multiple form tags to make each text box link to the button. how would replicate this functionality? I think you'd use the Attributes.Add method of the textbox control, but what javascript do you add?

-- Jenni
 
Old April 18th, 2005, 01:37 AM
Friend of Wrox
 
Join Date: Oct 2003
Posts: 326
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to Santhi Send a message via MSN to Santhi
Default

Using Javascript,onkeypress of the textbox check for the key pressed and call the function,whatever button option is doing.






Similar Threads
Thread Thread Starter Forum Replies Last Post
Enter Key Event (Enter Key Only) Coby Excel VBA 0 February 6th, 2008 09:55 PM
enter key should execute button click event MunishBhatia ASP.NET 2.0 Professional 6 November 25th, 2007 10:59 PM
Capturing a "Enter" key event in C# windows applic bhavna VS.NET 2002/2003 1 March 15th, 2007 07:45 AM
Enter Key event handler KevinO ASP.NET 1.0 and 1.1 Basics 2 August 17th, 2004 09:57 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.