示例#1
0
        public override void Process(TagHelperContext context, TagHelperOutput output)
        {
            var cart = ShoppingBag.Get(this.HttpContext);

            output.TagName = "a";
            output.Attributes.Add("href", "/Home/ShoppingBag");
            output.Content.SetContent($"Items: {cart.Count}");

            base.Process(context, output);
        }