基于ASP.NET AJAX的WebPart开发与部署

作者:凯旋网络来源:凯旋网络
nbsp;              }

                    //add the ScriptManager as the first control in the Page.Form
                    //I don''t think this actually matters, but I did it to be consistent with how you are supposed to place the ScriptManager when used declaritevly
                    this.Page.Form.Controls.AddAt(0, _AjaxManager);
                }
            }
        }
        #endregion

        #region Properties
        /// <summary>
        /// Exposes the Page''s script manager. The value is not set until after OnInit
        /// </summary>
        [WebPartStorage(Storage.None)]
        public ScriptManager AjaxManager
        {
            get { return _AjaxManager; }
            set { _AjaxManager = value; }
        }
        #endregion
    }
开发时只要继承这个WebPart就可以添加UpdatePanel,并在里面添加其他控件了。

  • 广告推荐