Defines the behavior for an extender control.
Assembly: System.Web.Extensions (in System.Web.Extensions.dll)
Thetype exposes the following members.
|GetScriptDescriptors||Registers the ScriptDescriptor objects for the control and returns an object that contains the ScriptDescriptor objects for the control.|
Extender controls that derive from the ExtenderControl class require a ScriptManager control to be on the page. The ExtenderControl base class performs an explicit test to make sure that a ScriptManager control exists on the page.
However, if you want to create extender controls and the page does not contain an ScriptManager control, you can create a class that implements the interface directly. Additionally, if you are creating a class that derives from Control or you are extending an existing control that derives from Control, you can implement the interface to support client functionality.
The interface registers the script libraries for a control by calling the GetScriptReferences method, and it registers ScriptDescriptor objects by calling the GetScriptDescriptors method. The GetScriptDescriptors method returns an IEnumerable list of ScriptDescriptor objects.
To create an extender control by implementing , you do the following:
Write code for the control's OnInit event to detect and use the ScriptManager control if it is available on the page.
Provide protected virtual members for members.
Provide instance script as a script block that you register with the ScriptManager control. You must do this during the control's PreRender, PreRenderComplete, or Render events.
Register the script descriptors during the control's Render event.
Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.