Connecting Tech Pros Worldwide Forums | Help | Site Map

How to launch a trigger in the update pannel with a return key pressed in a textbox?

jb
Guest
 
Posts: n/a
#1: Feb 19 '07
Hi!

I whould like to lanunch an async postback trigger from an updated panel
when a user presses the key return with the cursor in a textbox, is that
possible?

Thanks,

Xus





=?Utf-8?B?TWlsb3N6IFNrYWxlY2tpIFtNQ0FEXQ==?=
Guest
 
Posts: n/a
#2: Feb 19 '07

re: How to launch a trigger in the update pannel with a return key pressed in a textbox?


Hi there,

Quick workaround would be calling click() method of associated button (if
there is one), or adding an invisible (width=0px, height=0px) button, calling
its click() method as soon as you discover enter key has been pressed. I'm
not sure if you could easly use ClientScript.GetPostBackEventReference to
force dopostback because AJAX framework may validate actuall controls placed
within updatepanel (i might be wrong here, so please experiment a little bit
with ClientScript.GetPostBackEventReference).

Hope this helps
--
Milosz


"jb" wrote:
Quote:
Hi!
>
I whould like to lanunch an async postback trigger from an updated panel
when a user presses the key return with the cursor in a textbox, is that
possible?
>
Thanks,
>
Xus
>
>
>
>
>
jb
Guest
 
Posts: n/a
#3: Feb 20 '07

re: How to launch a trigger in the update pannel with a return key pressed in a textbox?


thanks, it is a good start

--






Jesús Bosch
www.jbmixed.blogspot.com
"Milosz Skalecki [MCAD]" <mily242@DONTLIKESPAMwp.plescribió en el mensaje
news:8C320D1F-9DFB-4C7C-A0E6-762D78A872A6@microsoft.com...
Quote:
Hi there,
>
Quick workaround would be calling click() method of associated button (if
there is one), or adding an invisible (width=0px, height=0px) button,
calling
its click() method as soon as you discover enter key has been pressed. I'm
not sure if you could easly use ClientScript.GetPostBackEventReference to
force dopostback because AJAX framework may validate actuall controls
placed
within updatepanel (i might be wrong here, so please experiment a little
bit
with ClientScript.GetPostBackEventReference).
>
Hope this helps
--
Milosz
>
>
"jb" wrote:
>
Quote:
>Hi!
>>
>I whould like to lanunch an async postback trigger from an updated panel
>when a user presses the key return with the cursor in a textbox, is that
>possible?
>>
>Thanks,
>>
>Xus
>>
>>
>>
>>
>>

Closed Thread