Exemplo n.º 1
0
        public static void EndOfBodyHtml(HttpContext httpContext, IHtmlContent html)
        {
            var res = RenderingContext.Current(httpContext, bodyKey);

            if (res == null || res.Empty)
            {
                OpenBodyContext(httpContext);
            }
            RenderingContext.AttachEvent <Action <IHtmlContent, object> >(httpContext, bodyKey,
                                                                          (f, o) =>
            {
                f(html, o);
            }
                                                                          );
        }
Exemplo n.º 2
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);
            }
                                                                          );
        }