I have a javascript function in the default.aspx page of my asp.net website project. I need to use that page in my myfolder/test1.aspx page. How can i refer to other page? without having to create a js file of my javascript page on default.aspx page…
I have a javascript function in the default.aspx page of my asp.net website project.
Share
The Javascript has to be loaded for each page. So unless you put it in a separate .js file which you reference from each page you’ll have to repeat the code – which is a very bad idea.
Just go with the separate .js file. You probably already have .css files you reference – it’s no different to that.