How to render scripts, generated in TagHelper process method, to the bottom of the page rather than next to the tag element?
问题 I am generating scripts in process method of TagHelper class as follows [TargetElement("MyTag")] public Class MYClass: TagHelper{ public override void Process(TagHelperContext context, TagHelperOutput output) { StringBuilder builder = new StringBuilder(); builder.Append("<script>"); builder.Append("//some javascript codes here); builder.Append("</script>"); output.Content.Append(builder.ToString()); } } Now it place the script very next to the tag element as its sibling. I need to place the