I'm working on a widget that uses javascript script tags. I am trying to move them to the RenderScripts section but am not having any luck.
I have this tag in my _layout @RenderSection("scripts", required: false)
@RenderSection("scripts", required: false)
and I have this in my widget.cshtml @section scripts {...}
@section scripts {...}
but the code in the widget is not being added to the renderscripts section.
So, I think I understand that this is not possible because I am trying to use the scripts section in a partial view. I figured out a work around for that. I have more questions in this area but will create a new question.
Please, sign in to be able to submit a new answer.