In an ASP.NET MVC site, where would the JQuery code go?

Posted by Maxim Z. on Stack Overflow See other posts from Stack Overflow or by Maxim Z.
Published on 2010-04-01T15:14:09Z Indexed on 2010/04/01 15:23 UTC
Read the original article Hit count: 279

Filed under:
|
|
|

I'm just getting started with ASP.NET MVC. I'm going to be using JQuery on the website I'm making, but I'm not really sure about one thing: where would JQuery code be placed?

This concerns two things:

  • Where do I import the JQuery JavaScript file? (I've been thinking that the Master page would be a good place to do this; am I right, or do I have to import it in each view?)
  • Should all my JQuery code be referenced from the Master page (i.e., I store my code that uses JQuery in a separate .js file and reference it in a <script> tag)?

Thanks in advance.

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about ASP.NET