Quantcast
Channel: ASP.NET Core
Viewing all articles
Browse latest Browse all 9386

ViewComponent and Scripts

$
0
0

With partial views it was not possible to register scripts in the host view's Script section without an HttpContext.Items hack.

I'm wondering if it is possible to write entirely encapsulated ViewComponents, including any necessary script or CSS references within the existing framework?  In other words, can a ViewComponent register a JavaScript reference with its host View?


Viewing all articles
Browse latest Browse all 9386

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>