Advertisement
Guest User

Untitled

a guest
Feb 20th, 2017
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. using Microsoft.AspNetCore.Razor.TagHelpers;
  2.  
  3. namespace RenderingTagHelperInsideAnother.TagHelpers
  4. {
  5. public class InnerTagHelper : TagHelper
  6. {
  7. public override void Process(TagHelperContext context, TagHelperOutput output)
  8. {
  9. output.TagName = "p";
  10. output.Attributes.SetAttribute(new TagHelperAttribute("class", "inner-tag-helper"));
  11. output.Content.SetHtmlContent("This is from the inner tag helper");
  12. }
  13. }
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement