0
Good morning,insira o código aqui
I am unable to load . js/. css when loading the partialview
in the layout
<!DOCTYPE html>
<html>
<head>
...
@RenderSection("header", required: false)
</head>
<body>
...
@RenderSection("scripts", required: false)
</body>
</html>
in the index view
@section header{
@Styles.Render(...)<carrega de boa>
@Scripts.Render(...)<carrega de boa>
}
@{
ViewBag.Title = "Usuários";
}
<div class="row">
@Html.Partial("~/Views/Cadastros/_ListaUsuarios.cshtml")
</div>
@section Scripts {
...
}
in partialview
@section header{
@Scripts.Render("~/Content/plugins/datatables/js") <<<<<<<<<<<<<<<<NÃO CARREGA>
}
<table id="#example" class="table-striped table-bordered tableHeader-skin-blue" style="width:100%">
<thead>
<tr>
....
</tr>
</thead>
<tbody>
...
</tbody>
</table>
I wonder why the script I put in partialview is not being added to html?
Would anyone know to tell me?
Thank you Fabricio, i’m putting: @Section header{ @Scripts.Render("~/Content/plugins/datatables/js") } na partial and is not even added on the page. (which will be a user table didn’t want to spend every waking hour declaring this guy).
– Marcelo Jesualdo
And did it work by changing some of the things I said? Tried to see the Chrome console error?
– Fabricio Fogaça
Yes as debug and working, just does not load the dll, the partial header Section is not loaded in the page header
– Marcelo Jesualdo