Skip to content

Instantly share code, notes, and snippets.

@danroth27
Created September 2, 2015 07:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danroth27/11eb2c44c4c6617ff57b to your computer and use it in GitHub Desktop.
Save danroth27/11eb2c44c4c6617ff57b to your computer and use it in GitHub Desktop.
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