ControlBuilder.AppendSubBuilder(ControlBuilder) Yöntem
Tanım
Önemli
Bazı bilgiler ürünün ön sürümüyle ilgilidir ve sürüm öncesinde önemli değişiklikler yapılmış olabilir. Burada verilen bilgilerle ilgili olarak Microsoft açık veya zımni hiçbir garanti vermez.
Kapsayıcı denetimine ControlBuilder ait tüm alt denetimler için nesnesine oluşturucular ekler.
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)
Parametreler
- subBuilder
- ControlBuilder
Alt ControlBuilder denetime atanan nesne.
Örnekler
Aşağıdaki örnek, bu denetim oluşturucusunun AppendSubBuilder kendi sınıfı örneğine ExceptionControlCollection denetim eklemeye çalışması için uygulandığında oluşturma yöntemini geçersiz kılar.
// 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