Main Page

  Previous Section Next Section


System.Web.UI (system.web.dll)sealed class

You can use this attribute to mark the class declaration for any custom controls that you create. If you specify True for the ChildrenAsProperties property, the ASP.NET parser will treat any sub-elements inside your control tag as object properties. If you do not use this attribute or you specify False, ASP.NET will assume that nested elements should be added as child controls. In this case, you can still set object properties by using the "object walker" syntax, where properties are split by using a dash (as in <MyControls MyObject-MyProperty="Value" />).

public sealed class ParseChildrenAttribute : Attribute {
// Public Constructors
   public ParseChildrenAttribute( );
   public ParseChildrenAttribute(bool childrenAsProperties);
   public ParseChildrenAttribute(bool childrenAsProperties, string defaultProperty);
// Public Static Fields
   public static readonly ParseChildrenAttribute Default;        // =System.Web.UI.ParseChildrenAttribute
// Public Instance Properties
   public bool ChildrenAsProperties{set; get; }
   public string DefaultProperty{set; get; }
// Public Instance Methods
   public override bool Equals(object obj);        // overrides Attribute
   public override int GetHashCode( );               // overrides Attribute
   public override bool IsDefaultAttribute( ); // overrides Attribute


System.Object System.Attribute ParseChildrenAttribute

Valid On


      Previous Section Next Section