ScriptControlDescriptor
Listing 17-8 presents the implementation of the replica ScriptControlDescriptor. As you can see, this class derives from the ScriptComponentDescriptor base class discussed in the previous sections. Note that the constructor of the ScriptControlDescriptor class makes use of the internal constructor of the ScriptComponentDescriptor base class. As discussed earlier, this internal constructor takes two parameters, the first containing the fully qualified name of the type of the ASP.NET AJAX control being instantiated and initialized, and the second containing the id HTML attribute of the associated DOM element of this ASP.NET AJAX control.
Listing 17-8: The ScriptControlDescriptor namespace CustomComponents3 {
using System;
public class ScriptControlDescriptor : ScriptComponentDescriptor {
public ScriptControlDescriptor(string type, string elementID) : base(type, elementID)
base.RegisterDispose = false;
public override string ClientID get { return this.ElementID; }
public string ElementID
get { return base.ElementlDInternal; }
public override string ID get { return base.ID; }
set { throw new InvalidOperationException("ID Not Settable"); }
Post a comment