I wonder why my js file work when I call it in the view:
@section Scripts {
<script>
function myFunction() {
alert("Hello1");
}
</script>
}
but does not work when I call it:
@section Scripts {
<script type="text/javascript" src="~/Views/Home/script.js"></script>
<script>
myFunction();
</script>
}
Razorfiles? Is the top file the _Layout and the second a view using the layout?