Let me explain the situation:
I have a Sharepoint 2010 solution in VS that contains:
- Some Model classes
- A LINQ-to-SQL data context
- A WCF REST service
- 3 Visual web parts
The web parts calls some methods in the WCF service using jQuery.
Right now, I'm adding the jQuery script from Microsoft Ajax CDN directly in the Visual Web Part markup (.ascx).
The thing is that if more than 1 web part is inserted in the same page, that script is being added more than once.
How can I make things so the script is registered only once, no matter how many web parts are inserted in the same page?