LiteralControl.CreateControlCollection Method
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Creates an EmptyControlCollection object for the current instance of the LiteralControl class.
protected:
override System::Web::UI::ControlCollection ^ CreateControlCollection();
protected override System.Web.UI.ControlCollection CreateControlCollection();
override this.CreateControlCollection : unit -> System.Web.UI.ControlCollection
Protected Overrides Function CreateControlCollection () As ControlCollection
The EmptyControlCollection for the current control.
The following code example overrides the CreateControlCollection method to create an instance of the ControlCollection class rather than an instance of the EmptyControlCollection class.
[System.Security.Permissions.PermissionSet(System.Security.Permissions.SecurityAction.Demand, Name="FullTrust")]
protected override ControlCollection CreateControlCollection()
{
myControlCollection=new ControlCollection(this);
return myControlCollection;
}
<System.Security.Permissions.PermissionSetAttribute(System.Security.Permissions.SecurityAction.Demand, Name:="FullTrust")> _
Protected Overrides Function CreateControlCollection() As ControlCollection
myControlCollection = New ControlCollection(Me)
Return myControlCollection
End Function 'CreateControlCollection
By default, LiteralControl objects contain only text and no child server controls. If you want to change this behavior, you must override this method.
Produkt | Verzie |
---|---|
.NET Framework | 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
Pripomienky k produktu .NET
.NET je open-source projekt. Ak chcete poskytnúť pripomienky, vyberte prepojenie: