We have a .aspx file which has about 400 lines of javascript code. Is it a good idea to have such huge code in its own file? What is the performance difference in having huge javascript code in aspx as against the .js file?
Please advise
You'll want it in a separate file for two reasons:
.js file to keep your code DRY. .js file for caching.