예제 #1
0
        /// <summary>
        /// 矪瞶岿Hander
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Page_Error(object sender, EventArgs e)
        {
            FileUploadUtility.WriteScriptBlock(this.Page.Response, true);

            onPageErrorMethodInfo.Invoke(this.PageRequestManager, new object[] { sender, e });

            FileUploadUtility.WriteScriptBlock(this.Page.Response, false);
        }
예제 #2
0
        /// <summary>
        /// ネΘCallBack
        /// </summary>
        /// <param name="writer"></param>
        /// <param name="pageControl"></param>
        private void RenderPageCallback(HtmlTextWriter writer, Control pageControl)
        {
            FileUploadUtility.WriteScriptBlock(this.Page.Response, true);

            StringBuilder  sb          = new StringBuilder();
            HtmlTextWriter innerWriter = new HtmlTextWriter(new StringWriter(sb));

            renderPageCallbackMethodInfo.Invoke(this.PageRequestManager, new object[] { innerWriter, pageControl });

            writer.Write(sb.Replace("*/", "*//*").Replace("</script", "</scriptt").ToString());

            FileUploadUtility.WriteScriptBlock(this.Page.Response, false);
        }
예제 #3
0
        /// <summary>
        /// эResponseHeader磞瓃?
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void PreSendRequestHeadersHandler(object sender, EventArgs e)
        {
            HttpApplication application = (HttpApplication)sender;
            HttpResponse    response    = application.Response;

            //* 狦琌Τfileupload北ン肚叫―
            if (response.StatusCode == 302 &&
                FileUploadUtility.IsInIFrameAsyncPostBack(application.Request.Params))
            {
                string            redirectLocation = response.RedirectLocation;
                List <HttpCookie> cookies          = new List <HttpCookie>(response.Cookies.Count);

                for (int i = 0; i < response.Cookies.Count; i++)
                {
                    cookies.Add(response.Cookies[i]);
                }

                response.ClearContent();
                response.ClearHeaders();

                for (int i = 0; i < cookies.Count; i++)
                {
                    response.AppendCookie(cookies[i]);
                }

                response.Cache.SetCacheability(HttpCacheability.NoCache);
                response.ContentType = "text/plain";

                FileUploadUtility.WriteScriptBlock(response, true);

                StringBuilder sb     = new StringBuilder();
                TextWriter    writer = new StringWriter(sb);
                FileUploadUtility.EncodeString(writer, "pageRedirect", String.Empty, redirectLocation);
                response.Write(sb.Replace("*/", "*//*").ToString());

                FileUploadUtility.WriteScriptBlock(response, false);

                response.End();
            }
        }