Problem with registering jquery

Asked

Viewed 27 times

1

I have an ASP.NET application with the structure Next:

ProjetoWeb (raiz projeto)

Compartilhado (pasta)
|---Scripts (pasta)
    |----jquery-1.8.0.js

Masters (pasta)
|----Site.master

Cadastros (pasta)
|----ListarCadastros.ASPX

Relatorio (pasta)
|----Vendas (pasta)
     |----Vendas.ASPX

i have registered on the Master page the script:

<script src="../Compartilhado/Scripts/jquery.responsivetable.min.js"></script>

For all pages that only have one folder level, it usually works (e.g., the Listershares.ASPX page)

but pages with more levels (e.g.: Sales.ASPX), does not function.

I’ve already switched to:

<script src="../../Compartilhado/Scripts/jquery.responsivetable.min.js">

But then the other pages stopped working.

How to solve this?

1 answer

0

Try it this way, if I remember well to use C# in ASPX this is how it declares:

<script src="<%= ResolveClientUrl("~/Compartilhado/Scripts/jquery.responsivetable.min.js") %>">

Using the Resolveclienturl function it always returns the relative URL.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.