public static ComponentHelperWrapperSettings GetConfig()
        {
            ComponentHelperWrapperSettings settings = (ComponentHelperWrapperSettings)ConfigurationBroker.GetSection("componentHelperWrapperSettings");

            if (settings == null)
                settings = new ComponentHelperWrapperSettings();

            return settings;
        }
Пример #2
0
        public static ComponentHelperWrapperSettings GetConfig()
        {
            ComponentHelperWrapperSettings settings = (ComponentHelperWrapperSettings)ConfigurationBroker.GetSection("componentHelperWrapperSettings");

            if (settings == null)
            {
                settings = new ComponentHelperWrapperSettings();
            }

            return(settings);
        }
Пример #3
0
        protected override void OnPreRender(EventArgs e)
        {
            ComponentHelperWrapperSettings config = ComponentHelperWrapperSettings.GetConfig();

            Page.ClientScript.RegisterClientScriptBlock(this.GetType(), ControlID,
                                                        string.Format(
                                                            "<object id=\"{0}\" codebase=\"{1}\" height=\"0\" width=\"0\" classid=\"{2}\" style=\"display: none\"></object>",
                                                            HttpUtility.HtmlAttributeEncode(ControlID),
                                                            HttpUtility.HtmlAttributeEncode(config.Codebase),
                                                            HttpUtility.HtmlAttributeEncode(config.ClassID)
                                                            ),
                                                        false);

            base.OnPreRender(e);
        }