public string RenderOrderProgress(int orderId) { Page page = new Page( ); int code = -1; try { StringBuilder sb = new StringBuilder( ); var control = page.LoadControl("~/Controls/UcOrderMealStatus.ascx") as Controls.UcOrderMealStatus; page.Controls.Add(control); page.EnableViewState = false; using (TextWriter writer = new StringWriter(sb)) { Context.Server.Execute(page, writer, true); } if (control.IsNeedReload) return "1"; else return sb.ToString( ); } catch (Exception ex) { Logging.Log("OrderMealServices->RenderOrderProgress", ex); return Utilities.GetWebServicesResult(code, ex.Message); } finally { page.Dispose( ); } }