Saturday, March 24, 2012

UpdatePanel and client-side triggers?

Is there any way to trigger an ajax postback by a client-side event, like the keyup-event on a textfield?

pnp:

Is there any way to trigger an ajax postback by a client-side event, like the keyup-event on a textfield?

What I mean is, all the examples I have seen so far all uses the click method of the button control as the trigger. Is it possible to use any other control and/or event, or am I limited to use the "native" postback/submit controls?


Any event can trigger a partial postback, if it originates from a control that is an AsyncPostbackTrigger of the panel. It doesn't have to be a button or click. For example, the selected index changing on a dropdown that has AutoPostBack set to true.

Additionally, you canprogrammatically call an update using JavaScript on the client side.


Thank you - this was exactly what I was looking for ;-)

No comments:

Post a Comment