PC Review


Reply
Thread Tools Rate Thread

carriage return in a textbox -> click a button?

 
 
HockeyFan
Guest
Posts: n/a
 
      28th Sep 2007
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?

 
Reply With Quote
 
 
 
 
Steve C. Orr [MCSD, MVP, CSM, ASP Insider]
Guest
Posts: n/a
 
      28th Sep 2007
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.

--
I hope this helps,
Steve C. Orr,
MCSD, MVP, CSM, ASPInsider
http://SteveOrr.net


"HockeyFan" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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?
>


 
Reply With Quote
 
HockeyFan
Guest
Posts: n/a
 
      28th Sep 2007
Does this mean that the default button gets clicked when a carriage
return is pressed inside a textbox?


On Sep 28, 10:09 am, "Steve C. Orr [MCSD, MVP, CSM, ASP Insider]"
<St...@Orr.net> wrote:
> 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.
>
> --
> I hope this helps,
> Steve C. Orr,
> MCSD, MVP, CSM, ASPInsiderhttp://SteveOrr.net
>
> "HockeyFan" <les.stock...@gmail.com> wrote in message
>
> news:(E-Mail Removed)...
>
>
>
> > 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?- Hide quoted text -

>
> - Show quoted text -



 
Reply With Quote
 
Steve C. Orr [MCSD, MVP, CSM, ASP Insider]
Guest
Posts: n/a
 
      29th Sep 2007
Yes.

--
I hope this helps,
Steve C. Orr,
MCSD, MVP, CSM, ASPInsider
http://SteveOrr.net


"HockeyFan" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Does this mean that the default button gets clicked when a carriage
> return is pressed inside a textbox?
>
>
> On Sep 28, 10:09 am, "Steve C. Orr [MCSD, MVP, CSM, ASP Insider]"
> <St...@Orr.net> wrote:
>> 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.
>>
>> --
>> I hope this helps,
>> Steve C. Orr,
>> MCSD, MVP, CSM, ASPInsiderhttp://SteveOrr.net
>>
>> "HockeyFan" <les.stock...@gmail.com> wrote in message
>>
>> news:(E-Mail Removed)...
>>
>>
>>
>> > 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?- Hide quoted
>> > text -

>>
>> - Show quoted text -

>
>


 
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
Textbox Carriage Return dancer Microsoft ASP .NET 2 18th May 2007 12:12 AM
carriage return in textbox =?Utf-8?B?RHJhY0tld2w=?= Microsoft Access VBA Modules 2 22nd Sep 2006 12:38 AM
Carriage Return in Report - Textbox Benjamin Z. Gregorian Microsoft Access Reports 4 11th Oct 2005 01:49 PM
carriage return in web textbox VMI Microsoft C# .NET 1 10th Aug 2005 04:14 PM
Carriage return in textbox Marcie Microsoft Excel Misc 4 10th Nov 2003 02:26 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:21 AM.