While in ASP.NET Core 2.0, I am trying to create a tag helper that relies on some custom JavaScript -- so, the idea is that the tag helper will inject the onchange event and then add code to do a postback to the server. Ideally, I don't want to have a separate JavaScript file but rather have the tag helper inject the javascript into the page.
This is similar in functionality to what was available in earlier versions of ASP.NET via a call to ClientScriptManager.RegisterClientScriptBlock
.
Is that possible to inject JavaScript into the page using ASP.NET Core?