by Abe Miessler
21. April 2011 05:58
I have been a slave to StackOverflow for some time now. In fact I recently cracked the 10,000 reputation mark that grants me access to the moderator tools (yay me!). Feel free to take a look at my account:

Anywho... at my new job I have been thrust into SharePoint development with a vengence. As the only .NET/SharePoint programmer there and having no prior experience, the learning curve has been a bit steep... Luckily for me, the StackExchange family has recently added a SharePoint site! You can find it at SharePoint.StackExchange.com.
It has a brilliant community of IT professionals that have been able to quickly answer any SharePoint related questions I've had. If you work with SharePoint and you have questions regarding usage, administration or development in SharePoint bring them to SharePoint.StackExchange.com!
de7d76e2-ebfe-444b-83e1-4887538a5154|0|.0
Tags:
SharePoint
by Abe Miessler
12. April 2011 07:31
For something so simple, this problem took me quite a while so I wanted to share how I resolved it. In my situation I wanted to add jQuery and a few jQuery plugin files to be part of my visual web part. This web part was going to be part of a wsp that would be shipped out to SharePoint environments that I had no control over, so simply including them in the master page was not an option.
Step 1:
Right click on your project file and select Add->SharePoint "Layouts" Mapped Folder
Step 2:
In side of the Layouts Mapped folder create the following file structure
YourProjectName/js
Step 3:
Add your js files to the folder you just created in your project.
Step 4:
Inside of your ascx file for you visual web part create the ScriptLink tag
<SharePoint:ScriptLink ID="ScriptLink1" runat="server" Name="YourProjectName/js/jquery.min.js" Localizable="false" LoadAfterUI="true" />
If you have jQuery plugins, place their ScriptLink tags AFTER the jQuery tag
You should now be in business. If you are havinig problems check the following directory to make sure your scripts are being deployed:
C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS\YourProjectName\js