Do you always put JavaScript in a separate file?
Last updated by Brady Stroud [SSW] 8 months ago.See historyASP.NET injects many lines during page rendering, so if you are using inline JavaScript, the line numbers will change during client side JavaScript debugging in VS.NET, FireBug or IE8 developer Tools.
So you should always put JavaScript in a separate file. Then the line numbers will stay consistent during debugging. Keeping JavaScript in a separate file is also good for production as it improves performance due to browser caching.
Note: During development, remember to hit CTRL-F5 to force the browser to re-fetch the files from the server or you may be debugging old version of the JavaScript file.