Export (0) Print
Expand All
0 out of 1 rated this helpful - Rate this topic

SPFile.GetLimitedWebPartManager Method

Returns the Web Part manager that is associated with the Web Parts page.

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: No
[ClientCallableMethodAttribute(CacheReturnValue = true)]
[ClientCallableExceptionConstraintAttribute(FixedId = "1", ErrorType = typeof(ArgumentOutOfRangeException), 
	Condition = "scope for the asp page must be either User or Shared")]
[ClientCallableExceptionConstraintAttribute(FixedId = "2", ErrorType = typeof(ArgumentNullException), 
	Condition = "1)Input Uri must not be null\n2)Page Url must not be relative Url")]
[ClientCallableExceptionConstraintAttribute(FixedId = "3", ErrorType = typeof(ArgumentException), 
	Condition = "Input Uri must be absolute")]
[ClientCallableExceptionConstraintAttribute(FixedId = "4", ErrorType = typeof(FileNotFoundException), 
	Condition = "New instance of initialstate webpartmanager must exist")]
[ClientCallableExceptionConstraintAttribute(FixedId = "5", ErrorType = typeof(SPException), 
	Condition = "1)Url extension is null\n2)Url extension is empty
3)Url extension is not aspx
4)Url extension is not master or ascx and url extension is not allowmasterpage")]
[SubsetCallableExcludeMemberAttribute(SubsetCallableExcludeMemberType.UnsupportedSPType)]
public SPLimitedWebPartManager GetLimitedWebPartManager(
	PersonalizationScope scope
)

Parameters

scope
Type: System.Web.UI.WebControls.WebParts.PersonalizationScope
A System.Web.UI.WebControls.WebParts.PersonalizationScope value that specifies either Shared, meaning that personalization data applies to all users and can be saved, or User, meaning that both user-specific personalization data, and personalization data that applies to all users, is loaded for controls on the page, but that only user-specific data can be saved.

Return Value

Type: Microsoft.SharePoint.WebPartPages.SPLimitedWebPartManager
An SPLimitedWebPartManager object that represents the Web Part manager.

Calling the GetLimitedWebPartManager method on a non-.aspx page throws an exception.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.