Welcome   |  ASP.NET   |  Web Services   |  How Do I...?   |  Class Browser  | WPF Quick Starts
  |   I want my samples in...   

ASP.NET Quickstart Tutorials

Go To...

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:
  1. Log in to the page. Calendars are displayed in the page.
  2. Select "Catalog" from the dropdown. The CatalogZone will now be visible, and will display a calendar control in its Declarative Catalog part.
C# Authorizing Web Parts
Run Sample View Source

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.




Hosted by MaximumASP | Found a broken link? | Contact Us | Terms and conditions | Privacy Policy | Advertise with us
� 2000 - 2010  Mindcracker LLC. All Rights Reserved