views:

31

answers:

2

i have a master page. i try to add js files. vs editor is not draw green color. But no affect my pages with js. i can not use below js. How can i write src? (i can use pickurl) but i don't see effects of js on page

<script src="Engineering/EngDynamicsCreationExcel/EngJs/jquery-1.3.2.min.js" type="text/javascript"></script>
<script src="../Engineering/EngDynamicsCreationExcel/EngJs/jquery-1.3.2.min.js" type="text/javascript"></script>
<script src="../../Engineering/EngDynamicsCreationExcel/EngJs/jquery-1.3.2.min.js" type="text/javascript"></script>
<script src="~/Engineering/EngDynamicsCreationExcel/EngJs/jquery-1.3.2.min.js" type="text/javascript"></script>

i added my js files pic below. Also i have a MasterPage in MroTechnic

A: 

Probably the problem is that your actual pages have different path than the master page which makes the path invalid. One solution would be to use ScriptManager and load the scripts with relative paths.

Stilgar
+1  A: 

I would make use of ResolveURL:

<script type="text/javascript" src="<%= ResolveUrl("~/Engineering/EngDynamicsCreationExcel/EngJs/jquery-1.3.2.min.js") %>"></script>
Dusty Roberts