Esempio n. 1
0
        /// <summary>
        /// 重载OnPreRender,输出ClientStateField,注册控件,注册Css文件
        /// Fires the PreRender event
        /// </summary>
        /// <param name="e">事件参数</param>
        protected override void OnPreRender(EventArgs e)
        {
            base.OnPreRender(e);

            EnsureID();

            // EnsureScriptManager();

            if (SupportsClientState)
            {
                Page.ClientScript.RegisterHiddenField(ClientStateFieldID, SaveClientState());
                Page.RegisterRequiresPostBack(this);
            }

            ScriptManager.RegisterScriptControl <ScriptControlBase>(this);

            ScriptObjectBuilder.RegisterCssReferences(this);
        }