Exemple #1
0
        public static MvcHtmlString Body(this HtmlHelper html)
        {
            LayoutViewContext layoutViewContext = LayoutViewContext.From(html.ViewContext);

            return(MvcHtmlString.Create(layoutViewContext.BodyContent));
        }
Exemple #2
0
        public static IDisposable Capture(this ViewUserControl control, string name)
        {
            var writer = LayoutViewContext.From(control.ViewContext).GetNamedContent(name);

            return(new HtmlTextWriterScope(control.Writer, writer));
        }
Exemple #3
0
        public static HelperResult RenderTomeltBody(this HtmlHelper html)
        {
            LayoutViewContext layoutViewContext = LayoutViewContext.From(html.ViewContext);

            return(new HelperResult(writer => writer.Write(layoutViewContext.BodyContent)));
        }