Ejemplo n.º 1
0
 public static void CloseFormContext(HttpContext httpContext, TagHelperOutput o)
 {
     if (DisabledPostFormContent.IsDisabled(httpContext))
     {
         return;
     }
     RenderingContext.CloseContext(o, httpContext, formKey);
 }
Ejemplo n.º 2
0
 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);
     });
 }
Ejemplo n.º 3
0
        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);
            }
                                                                          );
        }