Use Server Side Script In Sharepoint 2010

  1. <PageParserPaths>  
  2.        <PageParserPath VirtualPath="/SitePages/*" CompilationMode="Always" AllowServerSideScript="true" />  
  3.      </PageParserPaths>  

 

Now there are some additional properties you can assign:

Like CompilationMode, AlowServerSideScript andIncludeSubFolders and I guess the two latter parts are self explanatory but for CompilationMode, you have the following options:

  • Always: The default value, which compiles the page always.
  • Auto: Page will not be compiled if possible.
  • Never: The page will not be dynamically compiled.