Name
ParseChildrenAttribute
Synopsis
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 subelements 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 NotInheritable Class ParseChildrenAttribute : Inherits Attribute ' Public Constructors Public Sub New() Public Sub New(ByVal childrenAsProperties As Boolean) Public Sub New(ByVal childrenAsProperties As Boolean, ByVal defaultProperty As String) ' Public Shared Fields public Shared ReadOnly Default As ParseChildrenAttribute // =System.Web.UI.ParseChildrenAttribute ' Public Instance Properties Public Property ChildrenAsProperties As Boolean Public Property DefaultProperty As String ' Public Instance Methods Overrides Public Function Equals( ByVal obj As Object) As Boolean Overrides Public Function GetHashCode() As Integer Overrides Public Function IsDefaultAttribute() As Boolean End Class
Hierarchy
System.Object→System.Attribute→ ParseChildrenAttribute
Valid On
Class
Get ASP.NET in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.