LayoutDivContainer class

Provides the class for HTML server controls that map to HTML DIV elements and can be styled individually for any page.

Inheritance hierarchy

System.Object
  System.Web.UI.Control
    System.Web.UI.HtmlControls.HtmlControl
      System.Web.UI.HtmlControls.HtmlContainerControl
        Microsoft.SharePoint.Publishing.WebControls.LayoutDivContainer

Namespace:  Microsoft.SharePoint.Publishing.WebControls
Assembly:  Microsoft.SharePoint.Publishing (in Microsoft.SharePoint.Publishing.dll)

Syntax

'Declaration
<SharePointPermissionAttribute(SecurityAction.InheritanceDemand, ObjectModel := True)> _
<AspNetHostingPermissionAttribute(SecurityAction.InheritanceDemand, Level := AspNetHostingPermissionLevel.Minimal)> _
<SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel := True)> _
<AspNetHostingPermissionAttribute(SecurityAction.LinkDemand, Level := AspNetHostingPermissionLevel.Minimal)> _
Public Class LayoutDivContainer _
    Inherits HtmlContainerControl
'Usage
Dim instance As LayoutDivContainer
[SharePointPermissionAttribute(SecurityAction.InheritanceDemand, ObjectModel = true)]
[AspNetHostingPermissionAttribute(SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
[SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel = true)]
[AspNetHostingPermissionAttribute(SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
public class LayoutDivContainer : HtmlContainerControl

Remarks

When added to a page layout, the CSS classes for this web control can be overridden by using an alternate CSS on a per-page level.

The LayoutDivContainer class inherits HtmlContainerControl.

The RenderAttributes() method is overridden so that for each defined CSS class a new CSS class is added with an extended name, "[original name]-[page title]".

For example, if the following control is added to the page layout:

<LayoutDivContainer runat="server" class="fullPageLayout" />

it is rendered on the "Home" page as follows:

<div class="fullPageLayout fullPageLayout-Home" />

You then can override the fullPageLayout-Home in the DIV class by using an alternate CSS file.

Thread safety

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

See also

Reference

LayoutDivContainer members

Microsoft.SharePoint.Publishing.WebControls namespace