Personalizing Using Web Parts->Authorizing Web Parts
The web parts control set includes a mechanism to authorize web parts that applies to all the ASP.NET server controls when adding or importing those to a page. Page developers implement an authorization filter by subscribing to the WebPartManager.OnAuthorizeWebPart event.
This example shows a page that displays web parts that are of type Calendar:
You should inherit from the WebPartManager class and override the IsAuthorize method if the implementation of the WebPartManager.OnAuthorizeWebPart is the same across multiple pages. This approach will prevent redundant code across pages.
This example shows a page that displays web parts that are of type Calendar:
- Log in to the page. Calendars are displayed in the page.
- Select "Catalog" from the dropdown. The CatalogZone will now be visible, and will display a calendar control in its Declarative Catalog part.
You should inherit from the WebPartManager class and override the IsAuthorize method if the implementation of the WebPartManager.OnAuthorizeWebPart is the same across multiple pages. This approach will prevent redundant code across pages.


浙公网安备 33010602011771号