public static MvcHtmlString Body(this HtmlHelper html) { LayoutViewContext layoutViewContext = LayoutViewContext.From(html.ViewContext); return(MvcHtmlString.Create(layoutViewContext.BodyContent)); }
public static IDisposable Capture(this ViewUserControl control, string name) { var writer = LayoutViewContext.From(control.ViewContext).GetNamedContent(name); return(new HtmlTextWriterScope(control.Writer, writer)); }
public static HelperResult RenderTomeltBody(this HtmlHelper html) { LayoutViewContext layoutViewContext = LayoutViewContext.From(html.ViewContext); return(new HelperResult(writer => writer.Write(layoutViewContext.BodyContent))); }