carriage return in a textbox -> click a button?

H

HockeyFan

I've done this before by trapping keydown and checking for a CR, and
then clicking a particular button based on which textbox the event
happened. However, I was wondering if there's a simpler way to trap a
carriage return in a textbox, and have it click a button?
 
S

Steve C. Orr [MCSD, MVP, CSM, ASP Insider]

In ASP.NET 2.0 the panel control has a new DefaultButton property.
Set this property to the ID of a button control and it will be the default
button when focus is in that panel.
 
H

HockeyFan

Does this mean that the default button gets clicked when a carriage
return is pressed inside a textbox?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,051
Latest member
CarleyMcCr

Latest Threads

Top