Exemplo n.º 1
0
		internal CallbackFilter(Manager manager, Stream stream)
		{
			this.manager = manager;
			this.stream = stream;
			this.buffer = new MemoryStream();
		}
Exemplo n.º 2
0
        private static void AddManager(Page page)
        {
            Manager manager = HttpContext.Current.Items[RequestID.Manager] as Manager;
            if(manager == null)
            {
                manager = new Manager();

                // Hookup the two rendering event handlers we need access to
                page.PreRender += new EventHandler(manager.OnPreRender);
                page.Unload += new EventHandler(manager.OnUnload);

                manager.targets[RequestID.Manager] = manager;
                HttpContext.Current.Items[RequestID.Manager] = manager;
            }

            // References the form on the page with the javascript
            var form = page.GetForm();
            if(form != null)
            {
                page.ClientScript.RegisterClientScriptBlock(typeof(Manager), "pageScript", @"
            <script type=""text/javascript"">
            //<![CDATA[
            var Anthem_FormID = """ + form.ClientID + @""";
            //]]>
            </script>");
            }

            // Includes a reference to the anthem.js script in the page
            page.ClientScript.RegisterClientScriptResource(typeof(Manager), "AnthemNxt.Core.Anthem.js");
        }