Created
September 2, 2015 07:42
-
-
Save danroth27/11eb2c44c4c6617ff57b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class RepeaterTagHelper : TagHelper | |
{ | |
public int Count { get; set; } | |
public override async Task ProcessAsync(TagHelperContext context, TagHelperOutput output) | |
{ | |
output.TagName = null; | |
for (int i = 0; i < Count; i++) | |
{ | |
output.Content.Append(await context.GetChildContentAsync(useCachedResult: false)); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment