IControlPanel.RegisterCategory Method (ControlPanelCategoryInfo)

IIS 7.0

Registers a new category of features in the Home page.

Namespace:   Microsoft.Web.Management.Client
Assembly:  Microsoft.Web.Management (in Microsoft.Web.Management.dll)

void RegisterCategory(
	ControlPanelCategoryInfo categoryInfo

If the category is already registered, this registration is ignored.

The following example shows how to register a new category.

internal class DemoModule : Microsoft.Web.Management.Client.Module {

    protected override void Initialize(IServiceProvider serviceProvider,
        ModuleInfo moduleInfo) {
        base.Initialize(serviceProvider, moduleInfo);
        IControlPanel controlPanel = (IControlPanel)
        ModulePageInfo customPage = new ModulePageInfo(this,
            "Title ModuleDialogPage",
            "ModuleDialogPage Description",
            rLoadImg.loadImgs("rSmall.bmp"),         // small image
            rLoadImg.loadImgs("rLarge.bmp"),         // large image
            "long ModuleDialogPage description here"  // long description
        string s;
        // Show in the Perf category
        s = ControlPanelCategoryInfo.Performance;
        controlPanel.RegisterPage(s, customPage);

        // Create a new category registered for Area Categorization

        // Find the Area Categorization
        ControlPanelCategorization areaCat = null;
        foreach (ControlPanelCategorization categorization in
            controlPanel.Categorizations) {
            if (categorization.Key ==
                ControlPanelCategorization.AreaCategorization) {
                areaCat = categorization;
        // Create the new category to display under Area
        ControlPanelCategoryInfo myCategory =
            new ControlPanelCategoryInfo(
            "My E-business Area Category",
            "This is the description for my Area category",

        controlPanel.RegisterPage(myCategory.Name, customPage);

Return to top