Link to home
Start Free TrialLog in
Avatar of XTO
XTO

asked on

visual studio uses old version of javascript file

When my code hits my javascript file, it uses an old version (before I made recent changes). The page in debugger is titled: WebResource.axd?d=...[dynamic][read only].

It is not the current .js file I have saved with my application.

How do I fx this?
SOLUTION
Avatar of leakim971
leakim971
Flag of Guadeloupe image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Inteqam
Inteqam

add a dummy query string with a dummy value to the URL of the JS file.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of XTO

ASKER

In the OnPreRender event of my class I had the following code:

string scriptLocation =
                    Page.ClientScript.GetWebResourceUrl(this.GetType(), "querySections.querysection.js");

I changed querysection.js to querysection2.js . That didn't work.

I tried, querysection2.js?ver=123. That didn't work.

I hard coded into my .aspx page:
<script type="text/javascript" src="/queryAbstracts/querySection.js?ver=1"></script>

That didn't work either.
The browser is still reverting to the old version.


something is wrong. this should work.
are you caching the page? the full page?
Avatar of XTO

ASKER

I think I might have figured out what the problem is. My main project's bin directory has references to the projects, one of which contains the javascript file. I'm guessing that the DLL referenced in the BIN directory contains the old javascript file. Is that possible?
I may just need to update the DLL references in the BIN directory. I'll play around with that and see how that works.
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of XTO

ASKER

I was copying the DLL out of the project and copying it to the BIN folder of the main project. Rebuilding the page, I guess, was building the DLL in the original project and not the one copied to the BIN folder.
Avatar of XTO

ASKER

The above answers did not pertain to my situation, but they did increase my knowledge so I feel that they deserve some points.