Esempio n. 1
0
        /// <summary>
        /// Init the HtmlRewrite-engines event handlers. This is called every time a HtmlRewritePipe object
        /// is instantiated by the UrlRewriteModule
        /// </summary>
        /// <param name="sender">The sender.</param>
        /// <param name="e">The <see cref="EPiServer.Web.HtmlRewriteEventArgs"/> instance containing the event data.</param>
        static private void HtmlRewriteToExternal_HtmlRewriteInit(object sender, HtmlRewriteEventArgs e)
        {
            // We need an instance of ourselves, to keep track of our state
            ViewStateMover viewStateMover = new ViewStateMover();

            // There are two major events from the HtmlRewrite-engine, which allow us to rewrite
            // names and values of the content. The exact definition depends on the XmlNodeType
            // that is being processed.
            e.RewritePipe.HtmlRewriteName  += viewStateMover.HtmlRewriteNameEventHandler;
            e.RewritePipe.HtmlRewriteValue += viewStateMover.HtmlRewriteValueEventHandler;
        }
Esempio n. 2
0
        /// <summary>
        /// Init the HtmlRewrite-engines event handlers. This is called every time a HtmlRewritePipe object
        /// is instantiated by the UrlRewriteModule
        /// </summary>
        /// <param name="sender">The sender.</param>
        /// <param name="e">The <see cref="EPiServer.Web.HtmlRewriteEventArgs"/> instance containing the event data.</param>
        private static void HtmlRewriteToExternal_HtmlRewriteInit(object sender, HtmlRewriteEventArgs e)
        {
            // We need an instance of ourselves, to keep track of our state
            ViewStateMover viewStateMover = new ViewStateMover();

            // There are two major events from the HtmlRewrite-engine, which allow us to rewrite
            // names and values of the content. The exact definition depends on the XmlNodeType
            // that is being processed.
            e.RewritePipe.HtmlRewriteName += viewStateMover.HtmlRewriteNameEventHandler;
            e.RewritePipe.HtmlRewriteValue += viewStateMover.HtmlRewriteValueEventHandler;
        }