PC Review


Reply
Thread Tools Rate Thread

2 buttons but want enter key in textbox to execute one buttons' click event?

 
 
Roger
Guest
Posts: n/a
 
      20th May 2005
I would like to have the click event of one of two buttons to happen when a
person hits the enter key in a textbox on my aspx form.


Is this possible, or do I need to only have one button on the form?


thanks,

Rog


 
Reply With Quote
 
 
 
 
GreggTB
Guest
Posts: n/a
 
      20th May 2005
This should work....

http://codebetter.com/blogs/darrell....3/03/8374.aspx

I used that code as a static method so I can reference it like

MyCommonWebCode.SetDefaultButton(Page, this.txtTextControl,
this.btnMyDefaultButton);

There might be an easier way but I don't know. Good luck!

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Click event on buttons with the same location on different Forms Mihai Tataran Microsoft Dot NET Compact Framework 2 23rd May 2006 08:32 AM
Fire a buttons click event when enter pressed in combo box kohoutec Microsoft C# .NET 2 3rd Dec 2005 12:51 PM
How do I set a botton's click event to execute pressing the Enter =?Utf-8?B?RWR1YXJkbzc4?= Microsoft VB .NET 1 10th Nov 2005 04:53 AM
code on Click event for some buttons is not executed Galina Grechka Microsoft ASP .NET 1 14th Apr 2005 05:01 AM
Buttons not responding to click event =?Utf-8?B?c2Nz?= Microsoft VB .NET 3 20th Apr 2004 12:56 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:56 PM.