Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I use a JavaScript file in my ASP.NET project?

I want to use a JavaScript file, lying in the root folder. How can I include that JS file?

like image 709
Vineet Avatar asked Nov 20 '25 02:11

Vineet


2 Answers

It should be the same as including it in any standard html page..

<script type="text/javascript" src="/scriptname.js"></script>

If this isn't exactly what you are looking for let me know and I'd be happy to expand as far as I can.

like image 157
Quintin Robinson Avatar answered Nov 22 '25 15:11

Quintin Robinson


use

<script language="javascript" src="FILE PATH"></script>
like image 29
Jeeva Subburaj Avatar answered Nov 22 '25 16:11

Jeeva Subburaj