public static IDisposable BeginZoneContent(this HtmlHelper helper, string targetZone, ZoneInjectMode injectMode = ZoneInjectMode.Append, string key = null) { if (key.HasValue() && DocumentZone.HasUniqueKey(key)) { return(ActionDisposable.Empty); } return(new DocumentZone((WebViewPage)helper.ViewDataContainer, targetZone, injectMode, key)); }
public static void RenderZone(this HtmlHelper helper, string zone) { var snippets = DocumentZone.GetZoneContent(zone); if (snippets == null) { return; } foreach (var snippet in snippets) { helper.ViewContext.Writer.WriteLine(snippet); } }