public override async Task ProcessAsync(TagHelperContext context, TagHelperOutput output) { var innerScripts = new List <string>(); context.SetInnerScripts(innerScripts); await base.ProcessAsync(context, output); var id = GetIDForRendering(ID); output.TagName = "div"; output.Attributes["id"] = id; output.Content.Clear(); output.PostElement.AppendHtml("<script>" + FormatStartupScript(id, innerScripts) + "</script>"); }