/// <summary> /// Ensures a ScriptManager exists on the Page for this Control /// </summary> private void EnsureScriptManager() { ScriptControlHelper.EnsureScriptManager(ref this._scriptManager, this.Page); //if (_scriptManager == null) //{ // _scriptManager = ScriptManager.GetCurrent(Page); // if (_scriptManager == null) // { // ExceptionHelper.TrueThrow(this.Page.Form.Controls.IsReadOnly, Resources.DeluxeWebResource.E_NoScriptManager); // _scriptManager = new ScriptManager(); // _scriptManager.ScriptMode = ScriptMode.Release; // _scriptManager.EnableScriptGlobalization = true; // this.Page.Form.Controls.Add(_scriptManager); // //throw new HttpException(Resources.DeluxeWebResource.E_NoScriptManager); // } //} }
/// <summary> /// Ensures a ScriptManager exists on the Page for this Control /// </summary> private void EnsureScriptManager() { ScriptControlHelper.EnsureScriptManager(ref this._scriptManager, this.Page); }
/// <summary> /// 在页面Load之前,确保ScriptManager加载 /// </summary> /// <param name="sender">事件触发对象</param> /// <param name="e">事件参数</param> protected virtual void OnPagePreLoad(object sender, EventArgs e) { //EnsureScriptManager(); ScriptControlHelper.EnsureScriptManager(ref this._scriptManager, this.Page); }