Redigera

Dela via


FileLevelPageControlBuilder.AppendSubBuilder(ControlBuilder) Method

Definition

Adds a ControlBuilder object to the FileLevelPageControlBuilder object for any child controls that belong to the container control.

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

Parameters

subBuilder
ControlBuilder

The ControlBuilder assigned to the child control.

Exceptions

The ControlBuilder that was added is associated with a Content control and is only allowed on pages that contain Content controls.

The content page contained a literal other than a Content control.

Remarks

The AppendSubBuilder method overrides the ControlBuilder.AppendSubBuilder method to provide custom logic when master pages and content pages are being used. In a content page, anything that is not inside the Content control (except script blocks for server code) raises an HttpParseException exception. Adding a ControlBuilder object for a child control that is a Content control raises an HttpException exception. For more information about master and content pages, see ASP.NET Master Pages.

Applies to

See also