예제 #1
0
        public override void Process(TagHelperContext context, TagHelperOutput output)
        {
            string result = "";


            for (int i = 1; i <= PagingInfo.TotalPages; i++)
            {
                string attributeClass = "";
                if (i == PagingInfo.CurrentPage)
                {
                    attributeClass += " selected btn-primary";
                }
                attributeClass += " btn btn-default";
                result         += $"<a href='{Uri.Action("List", new { page = i, category = Model.CurrentCategory })}' class='{attributeClass}'>{i}</a>";
            }
            output.Content.SetHtmlContent(result);
        }