Mvc icon indicating copy to clipboard operation
Mvc copied to clipboard

TagHelperContext not contains GetChildContentAsync

Open blueskybcl opened this issue 10 years ago • 2 comments

code: public class EmailAsyncTagHelper:TagHelper { private const string EmailDomain = "contoso.com"; public override async Task ProcessAsync(TagHelperContext context, TagHelperOutput output) { output.TagName = "a"; // Replaces with tag var content = await context.GetChildContentAsync();//tooltip GetChildContentAsync method not contain in TagHelperContext class var target = content.GetContent() + "@" + EmailDomain; output.Attributes["href"] = "mailto:" + target; output.Content.SetContent(target); } }

source at https://github.com/blueskybcl/AuthoringTagHelpers why? please help me!

It was moved to TagHelperOutput. See: https://github.com/aspnet/Announcements/issues/90

NTaylorMullen avatar Dec 23 '15 00:12 NTaylorMullen

@NTaylorMullen Thank you

blueskybcl avatar Dec 23 '15 01:12 blueskybcl