This topic has not yet been rated - Rate this topic

UpdatePanelTriggerCollection Class

Represents a collection of UpdatePanelTrigger objects for an UpdatePanel control.

Namespace:  System.Web.UI
Assembly:  System.Web.Extensions (in System.Web.Extensions.dll)
[AspNetHostingPermissionAttribute(SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
[AspNetHostingPermissionAttribute(SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
public class UpdatePanelTriggerCollection : Collection<UpdatePanelTrigger>

Triggers in the UpdatePanelTrigger collection are specified by using the UpdatePanelTrigger Collection Editor in the designer or by adding them declaratively as <Triggers> elements inside the UpdatePanel control. You can add two types of triggers:

  • An AsyncPostBackTrigger object that can be used to specify that a control can cause an asynchronous postback and refresh the update panel's contents. The AsyncPostBackTrigger object is used for controls outside an update panel or controls that are not immediate child controls of an UpdatePanel control.

  • A PostBackTrigger object that can be used to specify that a postback control inside an UpdatePanel control can cause a synchronous postback and a full-page refresh.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5
Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ
Connecting triggers in UserControls
It seems to be possible to create a userControl with an embedded UpdatePanel, and it's not hard to expose the triggers collection.

       public UpdatePanelTriggerCollection triggers
{
get { return this.UpdatePanel1.Triggers; }
}

The challenge then is to have the user control "triggers" property connect up to the trigger helper (the panel that lets you assign triggers)

If someone can work that out then it would become possible to do easy UserUpdatePanels.

For reference, I'm doing this beacuse I want a UserControl on a UserPage that is triggered by an event from a UserControl on the MasterPage, and I want it all to be configurable within the Html designer.

Ultimately I should be able to create a userControl that externally behaves like an UpdatePanel.

Anyone care to tell me how to join those final dots?