Exemplo n.º 1
0
        public KnockoutTagBuilder <TModel> Span(string text, object htmlAttributes = null)
        {
            var tagBuilder = new KnockoutTagBuilder <TModel>(Context, "span", InstanceNames, Aliases);

            tagBuilder.ApplyAttributes(htmlAttributes);
            tagBuilder.SetInnerHtml(HttpUtility.HtmlEncode(text));
            return(tagBuilder);
        }
Exemplo n.º 2
0
        public KnockoutTagBuilder <TModel> Button(string caption, string actionName, string controllerName, object routeValues = null, object htmlAttributes = null)
        {
            var tagBuilder = new KnockoutTagBuilder <TModel>(Context, "button", InstanceNames, Aliases);

            tagBuilder.ApplyAttributes(htmlAttributes);
            tagBuilder.Click(actionName, controllerName, routeValues);
            tagBuilder.SetInnerHtml(HttpUtility.HtmlEncode(caption));
            return(tagBuilder);
        }