ASP.NET MVC UserControl requires css/javascript
-
23-08-2019 - |
Question
I have a user control (a user details form) which has a lot of javascript and css attached to it. i'm struggling to make my control decalre that it needs a certain file so it will be included in the "head" section of the html.
I also wonder what happens if i enter mutiple instances of a control (the is no InamingContainer or anything similiar).
Solution
This can be easily implemented using MvcScriptManager. Hope this help :)
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow