Wahtever
Wahtever

Reputation: 3678

how to use an external javascript file with visual studio

I used the link to attach the js file but the aspx cant read functions from it.

Upvotes: 1

Views: 3171

Answers (1)

gunwin
gunwin

Reputation: 4832

From within your *.aspx file you should write:

<script src="/script-location/your-script.js"></script>

or

<script src="http://www.yousite.com/script-location/your-script.js"></script>

You can then use functions from within it:

<script>
    mySpecialFunction();
</script>

See It Here

Upvotes: 2

Related Questions