private static TagBuilder WrapInListItem(TagBuilder inner, PagedListRenderOptions options, params string[] classes) { var li = new TagBuilder("li"); foreach (var @class in classes) li.AddCssClass(@class); if (options.FunctionToTransformEachPageLink != null) return options.FunctionToTransformEachPageLink(li, inner); li.InnerHtml = inner.ToString(); return li; }
private static TagBuilder WrapInListItem(TagBuilder inner, PagedListRenderOptions options, params string[] classes) { var li = new TagBuilder("li"); foreach (var @class in classes) { li.AddCssClass(@class); } if (options.FunctionToTransformEachPageLink != null) { return(options.FunctionToTransformEachPageLink(li, inner)); } AppendHtml(li, TagBuilderToString(inner)); return(li); }
private static TagBuilder WrapInListItem(TagBuilder inner, PagedListRenderOptions options, params string[] classes) { var li = new TagBuilder("li"); foreach (var @class in classes) { li.AddCssClass(@class); } if (options.FunctionToTransformEachPageLink != null) { return(options.FunctionToTransformEachPageLink(li, inner)); } //新增:将AElementClasses中的样式添加到翻页链接中 foreach (var c in options.AElementClasses ?? Enumerable.Empty <string>()) { inner.AddCssClass(c); } li.InnerHtml = inner.ToString(); return(li); }