Пример #1
0
        ///
        /// <summary>
        /// Raises the Load event.
        /// </summary>
        /// <remarks>
        /// This method notifies the server control that it should perform actions common to each HTTP request
        /// for the page it is associated with, such as setting up a database query. At this stage in the page
        /// lifecycle, server controls in the hierarchy are created and initialized, view state is restored, and
        /// form controls reflect client-side data.
        /// </remarks>
        /// <param name="e">An <see cref="EventArgs"/> object that contains the event data.</param>
        ///
        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);

            PrintAction.AddAttributes(Attributes);

            return;
        }
        ///
        /// <summary>
        /// Raises the PreRender event.
        /// </summary>
        /// <remarks>
        /// This method notifies the server control to perform any necessary prerendering steps prior to
        /// saving view state and rendering content.
        /// </remarks>
        /// <param name="e">An <see cref="EventArgs"/> object that contains the event data.</param>
        ///
        protected override void OnPreRender(EventArgs e)
        {
            base.OnPreRender(e);

            if (Enabled)
            {
                PrintAction.RegisterStartupScript(Page);
            }

            return;
        }
Пример #3
0
        ///
        /// <summary>
        /// Raises the Load event.
        /// </summary>
        /// <remarks>
        /// This method notifies the server control that it should perform actions common to each HTTP request
        /// for the page it is associated with, such as setting up a database query. At this stage in the page
        /// lifecycle, server controls in the hierarchy are created and initialized, view state is restored, and
        /// form controls reflect client-side data.
        /// </remarks>
        /// <param name="e">An <see cref="EventArgs"/> object that contains the event data.</param>
        ///
        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);

            if (String.IsNullOrEmpty(Text))
            {
                Text = Globalisation.GetString("printButtonDefaultText");
            }

            PrintAction.AddAttributes(Attributes);

            return;
        }
Пример #4
0
        ///
        /// <summary>
        /// Raises the Load event.
        /// </summary>
        /// <remarks>
        /// This method notifies the server control that it should perform actions common to each HTTP request
        /// for the page it is associated with, such as setting up a database query. At this stage in the page
        /// lifecycle, server controls in the hierarchy are created and initialized, view state is restored, and
        /// form controls reflect client-side data.
        /// </remarks>
        /// <param name="e">An <see cref="EventArgs"/> object that contains the event data.</param>
        ///
        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);

            EnsureChildControls();

            if (!IsInDesignMode)
            {
                PrintAction.AddAttributes(Attributes);
            }

            return;
        }