public static StringWriter RootWriter(this UpdatePanelScope scope, bool createIfNotExists = true)
 {
     var writer =
         createIfNotExists ?
             scope.ActionData(true).AddOrGetExisting("UpdatePanels.Renderer", () => new StringWriter())
             : scope.ActionData(true).TryGetValue("UpdatePanels.Renderer", null as StringWriter)
             ;
     return writer;
 }
 public static StringWriter RootWriter(this ControllerContext context, bool createIfNotExists = true)
 {
     var writer =
         createIfNotExists ?
             context.ActionData(true).AddOrGetExisting("UpdatePanels.Renderer", () => new StringWriter())
             : context.ActionData(true).TryGetValue("UpdatePanels.Renderer", null as StringWriter)
             ;
     return writer;
 }
 public static Stack<UpdatePanelScope> UpdatePanelsStack(this WebViewPage page)
 {
     return page.ActionData().AddOrGetExisting("UpdatePanelsStack", () => new Stack<UpdatePanelScope>());
 }