ControlBuilder.AppendSubBuilder(ControlBuilder) 메서드

정의

컨테이너 컨트롤에 속하는 모든 자식 컨트롤에 대한 ControlBuilder 개체에 빌더를 추가합니다.

public:
 virtual void AppendSubBuilder(System::Web::UI::ControlBuilder ^ subBuilder);
public virtual void AppendSubBuilder (System.Web.UI.ControlBuilder subBuilder);
abstract member AppendSubBuilder : System.Web.UI.ControlBuilder -> unit
override this.AppendSubBuilder : System.Web.UI.ControlBuilder -> unit
Public Overridable Sub AppendSubBuilder (subBuilder As ControlBuilder)

매개 변수

subBuilder
ControlBuilder

자식 컨트롤에 할당된 ControlBuilder 개체입니다.

예제

다음 예제에서는 클래스의 AppendSubBuilder 인스턴스에 Exception 컨트롤을 포함 하려고이 컨트롤 작성기를 적용 하는 경우 throw 하는 메서드를 재정의 ControlCollection 합니다.

// Override the AppendSubBuilder method to throw an
// exception if the class it is applied to attempts
// to include child controls. 
public override void AppendSubBuilder(ControlBuilder subBuilder)
{
    throw new Exception(
        "A custom label control cannot contain other objects.");
}
' Override the AppendSubBuilder method to throw an
' exception if the class it is applied to attempts
' to include child controls. 
Public Overrides Sub AppendSubBuilder(ByVal subBuilder As ControlBuilder)
    Throw New Exception( _
       "A custom label control cannot contain other objects.")
End Sub

적용 대상

추가 정보