Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 962109
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T01:27:10+00:00 2026-05-16T01:27:10+00:00

In Sharepoint 2007/ 2010 not sandboxed you could place images/css/javascripts etc. somewhere in Sharepoint

  • 0

In Sharepoint 2007/ 2010 not sandboxed you could place images/css/javascripts etc. somewhere in Sharepoint root folder or in wpresources folder.

What is a good/working place to put these files in sandboxed solutions?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T01:27:11+00:00Added an answer on May 16, 2026 at 1:27 am

    The goal was to have something resembling the usual structure with folders, subfolders, where you can just drop images and other client side files and reference them by relative url.

    And at the end the solution was to create a module with files, which is fairly easy in Visual Studio 2010 – Add new item -> Sharepoint -> Module.

    Then you can just create/drop files/folders there, and the files list in elements.xml is maintained by Visual Studio. They are not included in any library, but can be referenced and loaded as needed.

    One important thing is to give the module unique name or add Url attribute (which is url prefix), so that it would not conflict with files from other solutions.

    You reference files then using

    web.ServerRelativeUrl + "/YourModuleName/yourfile"
    

    Or, if you specified Url in elements.xml (<Module Name="YourModuleName" Url="YourUrl">)

    web.ServerRelativeUrl + "/YourUrl/YourModuleName/yourfile"
    

    If you deploy feature with module at a web scope, web is SPContext.Current.Web, and at a site scope it is SPContext.Current.Site.RootWeb

    And if there is a need to actualy get contents of the file, you can do that with

    web.GetFile("YourModuleName/yourfile")
    

    An article on including javascript files in particular, which uses module here.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to put together SharePoint 2007 (and, eventually, 2010) training materials for experienced
My Sharepoint 2007 web part executes code to start a K2 workflow process. The
In SharePoint 2007, there's a top nav that the user can hover over, which
In the early days of SharePoint 2007 beta, I've come across the ability to
Is it possible to change a Sharepoint 2007 Site Theme through a Web Service?
How do you debug your SharePoint 2007 code? Since SharePoint runs on a remote
Strange question, but: Sharepoint 2007 greets you with the Administrator Tasks on the Central
I am trying to build a CAML query for SharePoint 2007 environment, to get
I'm thinking about using log4net in a MOSS(SharePoint) 2007 project, but I need to
I have been tasked with coming up with a compatibility guide for SharePoint 2007

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.