private void BindTabs()
        {
            List <Tab> tabsList = new List <Tab>();

            tabsList.Add(new Tab(0, "home", GetLocalizedString("Tab.HomeFolder")));
            if (PackagesHelper.CheckGroupQuotaEnabled(PackageId, ResourceGroups.Web, Quotas.WEB_VIRTUALDIRS))
            {
                tabsList.Add(new Tab(1, "vdirs", GetLocalizedString("Tab.VirtualDirs")));
            }
            if (PackagesHelper.CheckGroupQuotaEnabled(PackageId, ResourceGroups.Web, Quotas.WEB_SECUREDFOLDERS))
            {
                tabsList.Add(new Tab(2, "securedfolders", GetLocalizedString("Tab.SecuredFolders")));
            }
            if (PackagesHelper.CheckGroupQuotaEnabled(PackageId, ResourceGroups.Web, Quotas.WEB_FRONTPAGE))
            {
                tabsList.Add(new Tab(3, "frontpage", GetLocalizedString("Tab.FrontPage")));
            }

            tabsList.Add(new Tab(4, "extensions", GetLocalizedString("Tab.Extensions")));

            if (PackagesHelper.CheckGroupQuotaEnabled(PackageId, ResourceGroups.Web, Quotas.WEB_ERRORS))
            {
                tabsList.Add(new Tab(5, "errors", GetLocalizedString("Tab.CustomErrors")));
            }
            if (PackagesHelper.CheckGroupQuotaEnabled(PackageId, ResourceGroups.Web, Quotas.WEB_HEADERS))
            {
                tabsList.Add(new Tab(6, "headers", GetLocalizedString("Tab.CustomHeaders")));
            }
            // Web Publishing is available either if Web Remote Management is enabled or FTP quota is enabled and the plan has dedicated app pools
            if ((PackagesHelper.CheckGroupQuotaEnabled(PackageId, ResourceGroups.Web, Quotas.WEB_REMOTEMANAGEMENT) ||
                 PackagesHelper.IsQuotaEnabled(PackageId, ResourceGroups.Ftp)) &&
                PackagesHelper.CheckGroupQuotaEnabled(PackageId, ResourceGroups.Web, Quotas.WEB_APPPOOLS))
            {
                tabsList.Add(new Tab(7, "wdeploypub", GetLocalizedString("Tab.WebDeployPublishing")));
            }
            if (PackagesHelper.CheckGroupQuotaEnabled(PackageId, ResourceGroups.Web, Quotas.WEB_MIME))
            {
                tabsList.Add(new Tab(8, "mime", GetLocalizedString("Tab.MIMETypes")));
            }
            if (PackagesHelper.CheckGroupQuotaEnabled(PackageId, ResourceGroups.Web, Quotas.WEB_COLDFUSION))
            {
                tabsList.Add(new Tab(9, "coldfusion", GetLocalizedString("Tab.ColdFusion")));
            }
            if (PackagesHelper.CheckGroupQuotaEnabled(PackageId, ResourceGroups.Web, Quotas.WEB_REMOTEMANAGEMENT))
            {
                tabsList.Add(new Tab(10, "webman", GetLocalizedString("Tab.WebManagement")));
            }

            if (dlTabs.SelectedIndex == -1)
            {
                if (!IsPostBack && Request["MenuID"] != null)
                {
                    // find required menu item
                    int idx = 0;
                    foreach (Tab tab in tabsList)
                    {
                        if (String.Compare(tab.Id, Request["MenuID"], true) == 0)
                        {
                            break;
                        }
                        idx++;
                    }
                    dlTabs.SelectedIndex = idx;
                }
                else
                {
                    dlTabs.SelectedIndex = 0;
                }
            }

            dlTabs.DataSource = tabsList.ToArray();
            dlTabs.DataBind();

            tabs.ActiveViewIndex = tabsList[dlTabs.SelectedIndex].Index;
        }