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

            return(MvcHtmlString.Create(layoutViewContext.BodyContent));
        }
示例#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));
        }
示例#3
0
        public static HelperResult RenderTomeltBody(this HtmlHelper html)
        {
            LayoutViewContext layoutViewContext = LayoutViewContext.From(html.ViewContext);

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