protected override void PreRenderAction()
{
if (!RequestManager.IsAjaxRequest && !this.eventsInit && (this.Visible && !RequestManager.IsMicrosoftAjaxRequest || this.IsInUpdatePanelRefresh || this.IsDynamic))
{
this.BeforeClientInit += OnBeforeClientInit;
this.AfterClientInit += OnAfterClientInit;
this.eventsInit = true;
}
base.PreRenderAction();
}