public static void CloseFormContext(HttpContext httpContext, TagHelperOutput o) { if (DisabledPostFormContent.IsDisabled(httpContext)) { return; } RenderingContext.CloseContext(o, httpContext, formKey); }
public static void OpenFormContext(HttpContext httpContext) { if (DisabledPostFormContent.IsDisabled(httpContext)) { return; } RenderingContext.OpenContext <Action <IHtmlContent, object> >(httpContext, formKey, (s, o) => { (o as TagHelperOutput).PostElement.AppendHtml(s); }); }
public static void EndOfFormHtml(HttpContext httpContext, IHtmlContent html) { if (DisabledPostFormContent.IsDisabled(httpContext)) { return; } var res = RenderingContext.Current(httpContext, formKey); if (res == null || res.Empty) { OpenFormContext(httpContext); } RenderingContext.AttachEvent <Action <IHtmlContent, object> >(httpContext, formKey, (f, o) => { f(html, o); } ); }