Jqgrid in a asp.net page in a subfolder not working due to js and css file paths

234 views Asked by At

I have implemented jqgrid within asp.net 3.5 vs2010. It is working fine as long as the asp.net page is onthe root folder, but when I move the page to a subfolder it tries to look for the js and css files with the foder under subfolder. The js and css files are in a folder under the root folder.

I am using the folowing code to reference to jquery files:

What it does is it appends the subfolder name to the path and the application is not able to find the js and css files. e.g /Scripts/jquery.jqGrid.js

How do I reference the js and css files under the html tag of asp.net page?

1

There are 1 answers

0
Oleg On

If you use developer version of jaGrid you have to modify the variable pathtojsfiles from the jquery.jqGrid.js depend on the path where you place jqGrid on your site.

I recommend you to include all files listed in jquery.jqGrid.js instead of using jquery.jqGrid.js. See this and this answers for more information.