In my opinion, you should expand your scripts into layouts, as well as images, style sheets, etc. that are not intended for users to customize.
You can map the Layouts folder to your project in VS 2010. Then add subfolders to display the name of your project, etc. (Right-click on the project → Add → SharePoint Layouts "Mapped Folder)
Layouts
- ProjectName
- - Scripts
- - - jquery-1.5.min.js
Then, when you deploy your solution, the scripts will be copied to the right place.
In your website, you can link to your scripts, for example:
In code:
ScriptLink.Register(this.Page, "ProjectName/Scripts/jquery-1.5.min.js", false);
But I prefer in .ascx:
<SharePoint:ScriptLink ID="ScriptLink2" Name="ProjectName/Scripts/jquery-1.5.min.js" runat="server" OnDemand="false" Localizable="false" />
markt source share