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

  • Thread starter Thread starter jb
  • Start date Start date
J

jb

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
 
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
 
Back
Top