WebPart.ContainerWidth property

NOTE: This API is now obsolete.

Gets the value set by the page author as a hint to the Web Part of how wide to expect the containing Web Part zone to be.

Namespace:  Microsoft.SharePoint.WebPartPages
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

'Declaration
<ObsoleteAttribute("Use WebPartZone.ContainerWidth instead.")> _
Protected ReadOnly Property ContainerWidth As String
    Get
'Usage
Dim value As String

value = Me.ContainerWidth
[ObsoleteAttribute("Use WebPartZone.ContainerWidth instead.")]
protected string ContainerWidth { get; }

Property value

Type: System.String
A string that specifies a CSS width as a percentage (%) or pixels (PX).

Remarks

The value of the ContainerWidth property is available only at run time. The values of the EffectiveFrameType, ContainerWidth, and Permissions properties can change just before the Web Part is rendered. This is because the ZoneID property might have changed, which affects the values of these properties. These properties are guaranteed to have their final values, taking into account any needed zone changes, when the Web Part's RenderWebPart method is called.

See also

Reference

WebPart class

WebPart members

Microsoft.SharePoint.WebPartPages namespace