Tuesday, February 3, 2009

What is trigger element in Ajax?

The element can contain any number each of two child nodes:
and . They both accept two
attributes, ControlID and EventName, and can specify any Control within the current unit of
encapsulation (for instance, if your UpdatePanel control resides within a Web User Control, you
should not attempt to reference a Control on the Page on which the User Control will reside).
The element is particularly useful in that it can target any event
from a Control that exists as a child of any UpdatePanel control in the unit of encapsulation, not
just the UpdatePanel under which this trigger is a child. Thus, any control can be made to
trigger a partial page update.
Similarly, the element can be used to trigger a partial page render, but
one that requires a full round-trip to the server. This trigger element can also be used to force a
full page render when a control would otherwise normally trigger a partial page render (for
instance, when a Button control exists in the element of an
UpdatePanel control). Again, the PostBackTrigger element can specify any control that is a child
of any UpdatePanel control in the current unit of encapsulation.

No comments:

Post a Comment