ControlBuilderAttribute.BuilderType 属性
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
获取与此特性关联的控件的 Type。 此属性为只读。
public:
property Type ^ BuilderType { Type ^ get(); };
public Type BuilderType { get; }
member this.BuilderType : Type
Public ReadOnly Property BuilderType As Type
属性值
与此特性关联的控件的 Type。
示例
// Using the NowWhiteSpaceControlBuilder with a simple control.
// When created on a page this control will not allow white space
// to be converted into a literal control.
[ControlBuilderAttribute(typeof(NoWhiteSpaceControlBuilder))]
[AspNetHostingPermission(SecurityAction.Demand,
Level=AspNetHostingPermissionLevel.Minimal)]
public sealed class MyNonWhiteSpaceControl : Control
{}
// A simple custom control to compare with MyNonWhiteSpaceControl.
[AspNetHostingPermission(SecurityAction.Demand,
Level=AspNetHostingPermissionLevel.Minimal)]
public sealed class WhiteSpaceControl : Control
{}
' Using the NowWhiteSpaceControlBuilder with a simple control.
' When created on a page this control will not allow white space
' to be converted into a literal control.
<ControlBuilderAttribute(GetType(NoWhiteSpaceControlBuilder))> _
<AspNetHostingPermission(SecurityAction.Demand, _
Level:=AspNetHostingPermissionLevel.Minimal)> _
Public NotInheritable Class MyNonWhiteSpaceControl
Inherits Control
End Class
' A simple custom control to compare with MyNonWhiteSpaceControl.
<AspNetHostingPermission(SecurityAction.Demand, _
Level:=AspNetHostingPermissionLevel.Minimal)> _
Public NotInheritable Class WhiteSpaceControl
Inherits Control
End Class