Export (0) Print
Expand All

HtmlContainerControl Class

Serves as the abstract base class for HTML server controls that map to HTML elements that are required to have an opening and a closing tag.

Namespace:  System.Web.UI.HtmlControls
Assembly:  System.Web (in System.Web.dll)

[AspNetHostingPermissionAttribute(SecurityAction::LinkDemand, Level = AspNetHostingPermissionLevel::Minimal)]
[AspNetHostingPermissionAttribute(SecurityAction::InheritanceDemand, Level = AspNetHostingPermissionLevel::Minimal)]
public ref class HtmlContainerControl abstract : public HtmlControl
<asp:HtmlContainerControl />

The most common controls with a closing tag are the <form>, <table>, <tr>, <td>, <a>, and <span> elements.

The InnerText and InnerHtml properties allow you to manipulate the content between the opening and closing tags of HtmlContainerControl-derived controls.

For a list of initial property values for an instance of HtmlContainerControl, see the HtmlContainerControl constructor.

A new instance of this class is not created directly.

Caution noteCaution:

If you use the InnerHtml property to specify the text between the opening and closing tags of an HTML server control, the text is not HTML encoded. This makes it possible to embed script within HTML tags in the text. When using the InnerHtml property, be sure to validate the value to reduce security vulnerabilities. Otherwise, consider using the InnerText property instead.

The following code example demonstrates how to use the InnerHtml property of this class to dynamically generate a message on a Web page.

No code example is currently available or this language may not be supported.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0, 2.0, 1.1, 1.0

Community Additions

ADD
Show:
© 2014 Microsoft