protected override void OnInit(EventArgs e)
        {
            //Remove any cache for the module, we don't want any cache in/after the BO editing.
            NBrightBuyUtils.RemoveModCache(ModuleId);

            // add required controls.
            RpData              = new Repeater();
            RpData.ItemCommand += CtrlItemCommand;

            this.Controls.Add(RpData);

            //set default Data controller
            ModCtrl = new NBrightBuyController();


            #region "Get all Settings for module"
            //get Model Level Settings
            ModSettings = new ModSettings(ModuleId, Settings);

            #endregion

            var strTemplate = "";
            if (!String.IsNullOrEmpty(CtrlPluginPath))
            {
                //search plugin path for template
                strTemplate = NBrightBuyUtils.GetTemplateData(CtrlTypeCode + "_Settings.html", CtrlPluginPath, "config", ModSettings.Settings());
            }
            if (strTemplate == "")
            {
                // add themefolder to settings, incase module has independant theme.
                strTemplate = ModCtrl.GetTemplateData(ModSettings, CtrlTypeCode + "_Settings.html", Utils.GetCurrentCulture(), StoreSettings.Current.DebugMode);
            }
            if (strTemplate != "")
            {
                RpData.ItemTemplate = NBrightBuyUtils.GetGenXmlTemplate(strTemplate, ModSettings.Settings(), PortalSettings.HomeDirectory);
            }

            //add template provider to NBright Templating
            NBrightCore.providers.GenXProviderManager.AddProvider("NBrightBuy,Nevoweb.DNN.NBrightBuy.render.GenXmlTemplateExt");
            var pInfo = ModCtrl.GetByGuidKey(PortalId, -1, "PROVIDERS", "NBrightTempalteProviders");
            if (pInfo != null)
            {
                NBrightCore.providers.GenXProviderManager.AddProvider(pInfo.XMLDoc);
            }


            base.OnInit(e);
        }