Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Expand Minimize

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)

[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).

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.

Show:
© 2015 Microsoft