I have old asp.net projects with pages and script as below
_Layout
<script src='@(Url.AbsoluteContent("~/js/some-js.js"))'></script>
<script src='@(Url.AbsoluteContent("~/js/another-js.js"))'></script>
@RenderSection("Scripts", required: false)
Child Page
@section Scripts {
<script src='@Html.Raw(Url.AbsoluteContent("~/js/child-js.js"))'></script>
}
However, when rendering happens
<script src="https://example.com/js/some-js"></script>
<script src="https://example.com/js/another-js"></script>
<script src="https://example.com/js/child-js"></script></script>
script ending tag is encoded and js is not available for its usage.
any possible resolution?
I have tried and not working.
<script src='@Html.Raw(Url.AbsoluteContent("~/js/some-js.js"))'></script>