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=...[dyna mic][read only].
It is not the current .js file I have saved with my application.
How do I fx this?
It is not the current .js file I have saved with my application.
How do I fx this?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
add a dummy query string with a dummy value to the URL of the JS file.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
In the OnPreRender event of my class I had the following code:
string scriptLocation =
Page.ClientScript.GetWebRe sourceUrl( this.GetTy pe(), "querySections.querysectio n.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/query Section.js ?ver=1"></ script>
That didn't work either.
The browser is still reverting to the old version.
string scriptLocation =
Page.ClientScript.GetWebRe
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/query
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?
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.
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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.
ASKER
The above answers did not pertain to my situation, but they did increase my knowledge so I feel that they deserve some points.