SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have some custom ASPX developed in VS2008 which have C# code. They are currently deployed at the moment to the LAYOUTS folder, although I believe they ought to be copied down to the site collection this feature is going to be used on.

Should these pages instead be kept in a FEATURES folder and copied down as part of the Feature Activation to the site collection? What else might need to be done in terms of allowing the custom code behind the pages to run?

share|improve this question

It depends on what is the purpose of the aspx page.

If it's for something similar to the pages in Site Settings and never should be modified by the user, then it should stay in a subfolder of LAYOUTS.

if it's some kind of content page, which may be modified by the user (maybe using SharePoint designer, then it should be in the feature folder with corresponding <Module> elements. The code should then be in a base class/controls which are registrered as SafeControls.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.