コード例 #1
0
ファイル: template.ascx.cs プロジェクト: skitsanos/WDK9
        /// <summary>
        /// This method is called by the template engine. It's one
        /// of the initialization methods. Use these ones rather than
        /// <see cref="Page_Load"/>.
        /// <seealso cref="AfterTemplating"/>
        /// </summary>
        /// <param name="page">The master page that loads the template.</param>
        public override void BeforeTemplating(Page page)
        {
            //if the page is a message controller, register myself
            IMessageMaster master = page as IMessageMaster;

            if (master != null)
            {
                master.RegisterClient(this);
            }
        }
コード例 #2
0
ファイル: MessageTable.ascx.cs プロジェクト: skitsanos/WDK9
        /// <summary>
        /// Initializes the control and registers itself with the
        /// master page.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Page_Load(object sender, EventArgs e)
        {
            //if the page is a message controller, register myself
            IMessageMaster master = this.Page as IMessageMaster;

            if (master != null)
            {
                master.RegisterClient(this);
            }
        }