コード例 #1
0
        private string BuilderNumberItems()
        {
            if (_pageDiplayAuto && _pagedList.TotalPages <= 1)
            {
                return(null);
            }

            var start = _pagedList.GetStartNumber();
            var end   = _pagedList.GetEndNumber();

            StringBuilder sb = new StringBuilder();

            for (int i = start; i <= end; i++)
            {
                var tag = BuildItemTag(i, i.ToString());

                if (i == _pagedList.PageNumber)
                {
                    tag.AddCssClass("active");
                }

                sb.Append(GetTagBuilderString(tag));
            }

            return(sb.ToString());
        }