ScriptManager.RegisterExtenderControl<TExtenderControl> Method

Definition

Registers an extender control with the current ScriptManager instance.

public:
generic <typename TExtenderControl>
 where TExtenderControl : System::Web::UI::Control, System::Web::UI::IExtenderControl virtual void RegisterExtenderControl(TExtenderControl extenderControl, System::Web::UI::Control ^ targetControl);
public void RegisterExtenderControl<TExtenderControl> (TExtenderControl extenderControl, System.Web.UI.Control targetControl) where TExtenderControl : System.Web.UI.Control, System.Web.UI.IExtenderControl;
abstract member RegisterExtenderControl : 'ExtenderControl * System.Web.UI.Control -> unit (requires 'ExtenderControl :> System.Web.UI.Control and 'ExtenderControl :> System.Web.UI.IExtenderControl)
override this.RegisterExtenderControl : 'ExtenderControl * System.Web.UI.Control -> unit (requires 'ExtenderControl :> System.Web.UI.Control and 'ExtenderControl :> System.Web.UI.IExtenderControl)
Public Sub RegisterExtenderControl(Of TExtenderControl As {Control, IExtenderControl}) (extenderControl As TExtenderControl, targetControl As Control)

Type Parameters

TExtenderControl

A control that implements the IExtenderControl interface.

Parameters

extenderControl
TExtenderControl

The extender control to register.

targetControl
Control

The script control that the extender control extends.

Exceptions

extenderControl is null.

-or-

targetControl is null.

Remarks

This method is primarily for use by control developers. Call the RegisterExtenderControl method from a custom ASP.NET Ajax extender control during its onInit event handler to register that control with the page. An ASP.NET Ajax extender control must be registered to participate in partial-page rendering.

The RegisterExtenderControl method adds the specified extender control to an internal list of extender controls and the target script controls they extend. This list is processed during the PreRender event.

Applies to