예제 #1
0
        /// <summary>
        /// Triage for AJAX patterns
        /// </summary>
        public void ProcessRequest(HttpContext context)
        {
            Ajax.Request request = this.HandlerFactory(new Ajax.Response(context), context);

            if (request != null)
            {
                // do not cache the response since underlying data could change at anytime
                context.Response.Cache.SetCacheability(HttpCacheability.NoCache);
                request.Process();
            }
        }
예제 #2
0
        /// <summary>
        /// Triage for AJAX patterns
        /// </summary>
        public System.IAsyncResult BeginProcessRequest(HttpContext context, AsyncCallback callback, object data)
        {
            Ajax.AsyncResult result  = new Ajax.AsyncResult(context, callback);
            Ajax.Request     request = this.HandlerFactory(result, context);

            if (request != null)
            {
                Thread worker = new Thread(request.Process);
                worker.Start();
            }
            return(result);
        }